note 105560 added to function.mysql-list-tables
| From: | wasifk007 at gmail dot com | Date: | Sat, 27 Aug 2011 15:23:12 +0000 |
| Subject: | note 105560 added to function.mysql-list-tables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182768@lists.php.net to get a copy of this message | ||
It can also be done with function mysql_query().
See the code below
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));
}
http://www.show-ip.org
----
Server IP: 69.147.83.197
Probable Submitter: 182.178.32.15
----
Manual Page -- http://www.php.net/manual/en/function.mysql-list-tables.php
Edit -- https://master.php.net/note/edit/105560
Del: integrated -- https://master.php.net/note/delete/105560/integrated
Del: useless -- https://master.php.net/note/delete/105560/useless
Del: bad code -- https://master.php.net/note/delete/105560/bad+code
Del: spam -- https://master.php.net/note/delete/105560/spam
Del: non-english -- https://master.php.net/note/delete/105560/non-english
Del: in docs -- https://master.php.net/note/delete/105560/in+docs
Del: other reasons-- https://master.php.net/note/delete/105560
Reject -- https://master.php.net/note/reject/105560
Search -- https://master.php.net/manage/user-notes.php