Re: mysql_db_name not working

From: Date: Sun, 19 Aug 2001 02:08:18 +0000
Subject: Re: mysql_db_name not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63331@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(); ... or die(mysql_error()); > $num_dbs = mysql_numrows($dbs); > for($i=0; $i<$num_dbs; $i++) > { > $db = mysql_dbname($dbs, $i); ... or die(mysql_error()); > 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 (#63331) next »