> 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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to