Re: checking for tables

From: Date: Mon, 11 Dec 2000 03:58:49 +0000
Subject: Re: checking for tables
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-29630@lists.php.net to get a copy of this message
Thanks everyone for the input - I went with DESC [table name] and it worked great. --Joe On Sun, Dec 10, 2000 at 09:54:40PM -0600, Don Read wrote: > > On 10-Dec-00 Joe Stump wrote: > > Anyone know how to check if a MySQL table exists easily? > > > > function tableexists($tbl) { > $res = @mysql_db_query(DB, "select count(*) from $tbl"); > return ($res ? true : false); > } > > Regards, > -- > Don Read dread@texas.net > -- The problem with people who have no vices is that you can be > sure they're going to have some pretty annoying virtues. --- Joe Stump PHP Programmer www.Care2.com

« previous php.general (#29630) next »