When we use
Mysql_list_dbs () function for PHP to obtain database table information ()
Resource mysql_list_dbs ([resource link_id])
Obtain the names of all databases on the server.
Example:
- Mysql_connect ("localhost", "name", "pwd ");
- $ Dbs = mysql_list_dbs ();
- While (list ($ db) = mysql_fetch_row (dbs )){
- Echo "$ db<Br>";
- }
Note that the output result is related to the user permissions used.
Mysql_db_name ()
String mysql_db_name (resource result_set, interger index)
Obtain the database name whose position is index in result_set returned by mysql_list_dbs.
Mysql_list_tables ()
Resource mysql_list_tables (string database [, resource link_id])
Obtain the names of all tables in the database.
Mysql_tablename ()
String mysql_tablename (resource result_set, interger index)
Obtain the index table name in result_set returned by mysql_list_tables.