function db_table_exists

7.x database.inc db_table_exists($table)
6.x database.pgsql.inc db_table_exists($table)
6.x database.mysqli.inc db_table_exists($table)
6.x database.mysql.inc db_table_exists($table)

Check if a table exists.

Parameters

$table: The name of the table.

Return value

TRUE if the table exists, and FALSE if the table does not exist.

Related topics

16 calls to db_table_exists()
blogapi_update_6001 in drupal-6.x/modules/blogapi/blogapi.install
Add blogapi_files table to enable size restriction for BlogAPI file uploads.
system_update_6019 in drupal-6.x/modules/system/system.install
Reconcile small differences in the previous, manually created mysql and pgsql schemas so they are the same and can be represented by a single schema structure.
system_update_6030 in drupal-6.x/modules/system/system.install
Add the tables required by actions.inc.
system_update_6032 in drupal-6.x/modules/system/system.install
profile_fields.name used to be nullable but is part of a unique key and so shouldn't be.
system_update_6033 in drupal-6.x/modules/system/system.install
Change node_comment_statistics to be not autoincrement.

... See full list

File

drupal-6.x/includes/database.mysql.inc, line 355
Database interface code for MySQL database servers.

Code

function db_table_exists($table) {
  return (bool) db_fetch_object(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
}