[PHP] Test tables existance

2003-03-30 Thread Antti
How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Test tables existance

2003-03-30 Thread Miles Thompson
Come on, check the mysql section of the PHP manual ... this took about 20 sec http://www.php.net/manual/en/function.mysql-list-tables.php At 11:34 PM 3/30/2003 +0300, Antti wrote: How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti -- PHP

Re: [PHP] Test tables existance

2003-03-30 Thread Haseeb Iqbal
PROTECTED] Sent: Monday, March 31, 2003 1:34 AM Subject: [PHP] Test tables existance How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] Test tables existance

2003-03-30 Thread Don Read
On 30-Mar-2003 Antti wrote: How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti function tableexists($tbl) { $res = @mysql_query(SELECT 1 FROM $tbl LIMIT 1); return ($res ? true : false); } Regards, -- Don Read