1 database.inc | db_index_exists($table, $name) |
Checks if an index exists in the given table.
Parameters
string $table: The name of the table in Backdrop (no prefixing).
string $name: The name of the index in Backdrop (no prefixing).
Return value
bool: TRUE if the given index exists, otherwise FALSE.
Related topics
File
- core/
includes/ database/ database.inc, line 3033 - Core systems for the database layer.
Code
function db_index_exists($table, $name) {
return Database::getConnection()->schema()->indexExists($table, $name);
}