function db_table_exists
Same name in other branches
- 8.9.x core/includes/database.inc \db_table_exists()
Checks if a table exists.
Parameters
$table: The name of the table in drupal (no prefixing).
Return value
TRUE if the given table exists, otherwise FALSE.
Related topics
24 calls to db_table_exists()
- DatabaseRegressionTestCase::testDBTableExists in modules/
simpletest/ tests/ database_test.test - Test the db_table_exists() function.
- DatabaseTemporaryQueryTestCase::testTemporaryQuery in modules/
simpletest/ tests/ database_test.test - Confirm that temporary tables work and are limited to one request.
- DatabaseTestCase::installTables in modules/
simpletest/ tests/ database_test.test - Set up several tables needed by a certain test.
- dblog_update_7003 in modules/
dblog/ dblog.install - Account for possible legacy systems where dblog was not installed.
- drupal_uninstall_schema in includes/
common.inc - Removes all tables defined in a module's hook_schema().
File
-
includes/
database/ database.inc, line 2880
Code
function db_table_exists($table) {
return Database::getConnection()->schema()
->tableExists($table);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.