Archive: exists

 

Posts Tagged ‘exists’


Sometime you need a PHP script to check for the existence of a MySQL table. This function achieves that for you. PLAIN TEXT PHP: function db_table_exists($table){     $exists = false;     $tables_query = db_query("SHOW TABLES FROM " . MYSQL_DB);     while($t = mysql_fetch_assoc($tables_query)){         foreach($t as $k=>$v){     [...]