Re: Checking existence of a table.

2003-02-17 Thread Stefan Hinz
Ed, > What query would I use to check for an existence of a table within a > database? I'm currently writting a set of scripts in php. Is this possible > with MySQL or do I need to create a condition within PHP? In MySQL, you can issue: SHOW TABLES [FROM your_database] LIKE 'your_pattern' Wher

RE: Checking existence of a table.

2003-02-17 Thread Don Read
On 17-Feb-2003 [EMAIL PROTECTED] wrote: > > What query would I use to check for an existence of a table within a > database? I'm currently writting a set of scripts in php. Is this possible > with MySQL or do I need to create a condition within PHP? > > Thanks, > function tableexists($tbl) {

Re: Checking existence of a table. (finished)

2003-02-17 Thread ed
Thanks for all the replies. I've got a hnadle on it now. Ed On Mon, 17 Feb 2003, Paul DuBois wrote: > At 11:10 -0500 2/17/03, <[EMAIL PROTECTED]> wrote: > >What query would I use to check for an existence of a table within a > >database? I'm currently writting a set of scripts in php. Is this

Re: Checking existence of a table.

2003-02-17 Thread Jerry
There is an example in the php manual. http://uk.php.net/manual/en/function.mysql-list-tables.php chrisshaffer at bellsouth dot net wrote : function mysql_table_exist($tableName) { $query = "SELECT COUNT(*) FROM $tableName"; $result = mysql_query($query); $num_rows = @mysql_num_rows($resu

Re: Checking existence of a table.

2003-02-17 Thread Paul DuBois
At 11:10 -0500 2/17/03, <[EMAIL PROTECTED]> wrote: What query would I use to check for an existence of a table within a database? I'm currently writting a set of scripts in php. Is this possible with MySQL or do I need to create a condition within PHP? You can check the output of SHOW TABLES or

RE: Checking existence of a table.

2003-02-17 Thread Simon Green
show tables from databasename; Simon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 17 February 2003 16:11 To: [EMAIL PROTECTED] Subject: Checking existence of a table. What query would I use to check for an existence of a table within a database? I'm curre