db_table_exists
Definition
db_table_exists($table)
includes/database.pgsql.inc, line 385
Description
Check if a table exists.
Related topics
| Name | Description |
|---|---|
| Database abstraction layer | Allow the use of different database servers using the same code base. |
Code
<?php
function db_table_exists($table) {
return (bool) db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '{". db_escape_table($table) ."}'"));
}
?> 