diff options
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r-- | includes/database.mysqli.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index 9cefafc6d..191999145 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -346,14 +346,14 @@ function db_unlock_tables() { * Check if a table exists. */ function db_table_exists($table) { - return db_fetch_object(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'")) ? TRUE : FALSE; + return (bool) db_fetch_object(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'")); } /** * Check if a column exists in the given table. */ function db_column_exists($table, $column) { - return db_fetch_object(db_query("SHOW COLUMNS FROM {%s} LIKE '%s'", $table, $column)) ? TRUE : FALSE; + return (bool) db_fetch_object(db_query("SHOW COLUMNS FROM {". db_escape_table($table) ."} LIKE '". db_escape_table($column) ."'")); } /** |