Menu
Hi
I have tried to make a simple function that checks if a table in database exists, and return true or false, but I can’t seem to make it work!
Any ideas why??
[code=php]function check_table($table){
$table_check = “SHOW TABLES LIKE ‘$table'”;
$table_check_result = mysql_query($table_check)
or die ($table_check_error = mysql_error());
if (empty($table_check_result)){
return true;
}
else{
return false;
}
}