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
use mysql_query(show tables); get them in array and then scan the array thats what i would do if there isn;t any function Friendship is always a sweet responsibility, never an opportunity. HaSeEb IqBaL. 0300-4258030 - Original Message - From: Antti [EMAIL PROTECTED] To: [EMAIL

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