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
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) {
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
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
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
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