wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



add_clean_index › WordPress Function

Depuis1.0.1
Dépréciéen/a
add_clean_index ( $table, $index )
Paramètres: (2)
  • (string) $table Database table name.
    Requis: Oui
  • (string) $index Database table index column.
    Requis: Oui
Retourne:
  • (true) True, when done with execution.
Défini(e) dans:
Codex:

Adds an index to a specified table.



Source

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

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

	return true;
}