add_clean_index( string $table, string $index )
将索引添加到指定的表中。
参数
- $table
- (string)
(Required)
表名称。 - $index
- (string)
(Required)
数据库表索引列。
返回值
(true) 执行完毕后,将返回 true。
源代码
File: wp-admin/includes/upgrade.php
function add_clean_index($table, $index) {
global $wpdb;
drop_index($table, $index);
$wpdb->query("ALTER TABLE `$table` ADD INDEX ( `$index` )");
return true;
}
更新日志
Version | 描述 |
---|---|
1.0.1 | Introduced. |
相关函数
Uses
- wp-admin/includes/upgrade.php:drop_index()
- wp-includes/wp-db.php:wpdb::query()
你可能对这些文章感兴趣:
- wordpress函数gd_edit_image_support()用法示例
- wordpress函数funky_javascript_callback()用法示例
- wordpress函数funky_javascript_fix()用法示例
- wordpress函数gallery_shortcode()用法示例
- wordpress函数format_to_edit()用法示例
- wordpress函数format_to_post()用法示例
- wordpress函数form_option()用法示例
- wordpress函数force_ssl_login()用法示例
- wordpress函数format_code_lang()用法示例
- wordpress函数format_for_editor()用法示例
- wordpress函数force_ssl_content()用法示例
- wordpress函数flush_rewrite_rules()用法示例
- wordpress函数force_balance_tags()用法示例
- wordpress函数force_ssl_admin()用法示例
如有疑问,请前往问答中心反馈!
反馈