Removes the specified index


bool smf_db_remove_index (string $table_name, void $index_name[, array $parameters[, string $error]])

Parameter $table_name

Expected type: String
Description: The name of the table containing the index that we want to drop

Parameter $index_name

Expected type: Void
Description: The name of the index we want to drop. Use 'primary' to drop a primary key.

Parameter $parameters

Expected type: Array
Description: An array of parameters

Array Elements of $parameters
Key Optional Expected type Description
no_prefix yes Boolean If true, SMF won't add the db_prefix to the table name

Parameter $error

Expected type: Enumerated String
Description: Error parameter (currently not used?)

Possible string values
Allowed values Description
'fatal' Default value

Return value

Expected type: Boolean
Description: True if the index was successfully dropped, false if it doesn't exist


  • Removes the specified index from the specified table
  • Will drop a primary key if $index_name is 'primary'