wpseek.com
WordPress开发者和主题制作者的搜索引擎



add_clean_index › WordPress Function

Since1.0.1
已弃用n/a
add_clean_index ( $table, $index )
参数: (2)
  • (string) $table Database table name.
    Required: Yes
  • (string) $index Database table index column.
    Required: Yes
返回:
  • (true) True, when done with execution.
定义在:
文档:

Adds an index to a specified table.



源码

function add_clean_index( $table, $index ) {
	global $wpdb;

	drop_index( $table, $index );
	$wpdb->query( "ALTER TABLE `$table` ADD INDEX ( `$index` )" );

	return true;
}