Re: Table exists?
| From: | Martin C. Petersen | Date: | Sat, 09 Feb 2002 19:52:06 +0000 |
| Subject: | Re: Table exists? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84126@lists.php.net to get a copy of this message | ||
Nick Wilson wrote:
> What would be the easiest way to see if a MySQL table exists with PHP?
> I can do it by checking against mysql_list_tables() but that seems a
> little clumsy. Is there a better way?
Do a select on the table - if the query returns true the table exists
otherwise the test is inconclusive..
Best regards
Martin Petersen