|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-12 10:46 UTC] lucifer at vengeance dot et dot tudelft dot nl
[2003-03-12 11:12 UTC] georg@php.net
[2003-03-13 02:47 UTC] georg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 02:00:01 2025 UTC |
the function "mysql_list_tables" changes the database subsequent queries will run on; an example: $link = mysql_connect( "host", "user", "password" ); mysql_select_db( "db1", $link ); /* now db1 is selected */ print "** tables in selected database before mysql_list_tables **<BR>" $q = mysql_query( "show tables" ); while( $row = mysql_fetch_array( $q ) ) { print $row[0]."<BR>"; } $tables = mysql_list_tables( "db2" ); /* now db2 is selected */ print "** tables in selected database after mysql_list_tables **<BR>" $q = mysql_query( "show tables" ); while( $row = mysql_fetch_array( $q ) ) { print $row[0]."<BR>"; }