Hi,

Friday, December 6, 2002, 2:08:42 AM, you wrote:
h> I am really sorry but i can't find any good mySQL good mailing list...

h> How can i make a little php function to check if a table exists ?

h> Thanks a lot,
h> Hacook




 function table_exists($table){
          return (@mysql_query('SELECT count(*) FROM '.$table));
 }
 
 //usage
 $con = @mysql_connect("host" , "user" , "password");
 $table = "database.table";
 if(table_exists($table)){
        echo "Table $table exists. <br>";
 }else{
        echo "Table $table does not exist.<br>";
 }



-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to