db_table_exists

Versions
5 – 7
db_table_exists($table)

Check if a table exists.

Related topics

Code

includes/database.pgsql.inc, line 393

<?php
function db_table_exists($table) {
  return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{" . db_escape_table($table) . "}'"));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.