note 61261 added to function.mysql-list-tables
| From: | mrkvomail at centrum dot cz | Date: | Sun, 29 Jan 2006 19:48:21 +0000 |
| Subject: | note 61261 added to function.mysql-list-tables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102679@lists.php.net to get a copy of this message | ||
You can also do this with function mysql_query(). It's better because mysql_list_tables is old
function and you can stop showing errors.
function mysql_table_exists($dbLink, $database, $tableName)
{
$tables = array();
$tablesResult = mysql_query("SHOW TABLES FROM $database;", $dbLink);
while ($row = mysql_fetch_row($tablesResult)) $tables[] = $row[0];
if (!$result) {
}
return(in_array($tableName, $tables));
}
----
Server IP: 64.246.30.37
Probable Submitter: 213.29.16.195 (proxied: 192.168.1.101)
----
Manual Page -- http://www.php.net/manual/en/function.mysql-list-tables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61261
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61261&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61261&report=yes
Search -- http://master.php.net/manage/user-notes.php