function db_table_exists
Search API
7.x db.inc | db_table_exists($table_name) |
6.x db.inc | db_table_exists($table_name) |
4.x db.inc | db_table_exists($table_name) |
5.x db.inc | db_table_exists($table_name) |
Returns TRUE if the table specified exists or not.
1 call to db_table_exists()
- audit_install in modules/
audit/ audit.install - Implementation of hook_install.
File
- includes/
db.inc, line 846 - This file contains mostly db shortcuts.
Code
function db_table_exists($table_name) {
$res = db_query("SHOW TABLES LIKE ? ", $table_name);
$cur = db_fetch_array($res);
if ($cur [0] == $table_name) {
return TRUE;
}
return FALSE;
}