mysql_db_name not working

From: Date: Thu, 16 Aug 2001 17:21:12 +0000
Subject: mysql_db_name not working
Groups: php.general 
Request: Send a blank email to php-general+get-63075@lists.php.net to get a copy of this message
The command "mysql_db_name" is not working in our installation. We get no error, but no database listing either if we use this command. ----- // This is the code which does NOT work: $dbs = mysql_list_dbs(); $num_dbs = mysql_numrows($dbs); for($i=0; $i<$num_dbs; $i++) { $db = mysql_dbname($dbs, $i); echo "db=".$db."<br>"; } ----- // And this is adopted code from the manual which DOES work: $db_list = mysql_list_dbs($conn); while ($row = mysql_fetch_object($db_list)) { echo "db=".$row->Database . "<br>"; } ----- I tried both: mysql_db_name, mysql_dbname. We need this function to use phpMyAdmin. Solaris 8, Apache 1.3.20, PHP 4.0.6, MySQL 3.23.40 Any ideas why this command does not work? TIA, Peter

« previous php.general (#63075) next »