Php obtains the code of all table names in the mysql database. Copy the code as follows: $ serverlocalhost; $ userroot; $ pass; $ dbnamedayanmei_com; $ connmysql_connect ($ server, $ user, $ pass); if (! $ Conn) die (database system connection
The code is as follows:
$ Server = 'localhost ';
$ User = 'root ';
$ Pass = '';
$ Dbname = 'dayanmei _ com ';
$ Conn = mysql_connect ($ server, $ user, $ pass );
If (! $ Conn) die ("database system connection failed! ");
Mysql_select_db ($ dbname) or die ("database connection failed! ");
$ Result = mysql_query ("show tables ");
While ($ row = mysql_fetch_array ($ result ))
{
Echo $ row [0]. "";
}
Mysql_free_result ($ result );
Note that the mysql_list_tables function for listing all table names in mysql in php has been deleted. we recommend that you do not use this function list for mysql data tables.
The http://www.bkjia.com/PHPjc/323245.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323245.htmlTechArticle code is as follows: $ server = 'localhost'; $ user = 'root'; $ pass = ''; $ dbname = 'dayanmei _ com '; $ conn = mysql_connect ($ server, $ user, $ pass); if (! $ Conn) die ("database system connection...