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.
2 calls to db_table_exists()
- content_install in modules/
content/ content.install - Hook install. Called when the module is installed on the admin modules page.
- course_search_install in modules/
course_search/ course_search.install - Implementation of hook_install
File
- includes/
db.inc, line 291 - 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;
}