You are here

function db_table_exists in Drupal 5

Same name in this branch
  1. 5 includes/database.mysqli.inc \db_table_exists()
  2. 5 includes/database.mysql.inc \db_table_exists()
  3. 5 includes/database.pgsql.inc \db_table_exists()
Same name and namespace in other branches
  1. 8 core/includes/database.inc \db_table_exists()
  2. 6 includes/database.mysqli.inc \db_table_exists()
  3. 6 includes/database.mysql.inc \db_table_exists()
  4. 6 includes/database.pgsql.inc \db_table_exists()
  5. 7 includes/database/database.inc \db_table_exists()

Check if a table exists.

Related topics

2 calls to db_table_exists()
system_update_1005 in modules/system/system.install
update_create_cache_tables in ./update.php
Create tables for the split cache.

File

includes/database.mysql.inc, line 421
Database interface code for MySQL database servers.

Code

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