note 25710 added to function.mysql-list-tables

From: Date: Wed, 02 Oct 2002 19:06:35 +0000
Subject: note 25710 added to function.mysql-list-tables
Groups: php.notes 
Request: Send a blank email to php-notes+get-37571@lists.php.net to get a copy of this message
The example by PHP-Guy to determine if a table exists is interesting and useful (thanx), except for one tiny detail. The function 'mysql_list_tables()' returns table names in lower case even when tables are created with mixed case. To get around this problem, add the 'strtolower()' function in the last line as follows: return(in_array(strtolower($tableName), $tables)); -- http://www.php.net/manual/en/function.mysql-list-tables.php http://master.php.net/manage/user-notes.php?action=edit+25710 http://master.php.net/manage/user-notes.php?action=delete+25710 http://master.php.net/manage/user-notes.php?action=reject+25710

« previous php.notes (#37571) next »