[PHP] mysql_db_name not working (followup)

2001-08-16 Thread Peter Ostry

> 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.
> -

Now I know more:
mysql_tablename is not working either - we tested both commands in a 
separate file. I wonder what else is not working...

phpMyAdmin cannot be used, we get "document contained no data" and 
sometimes corrupted pages, code cut off where PHP variables should be 
inserted. There is a for-loop which displays the db's and tables. The 
variable $j for example is correctly inserted twice and at the third 
time it breaks the code and kills the loop.
If we work around 'mysql_db_name' and 'mysql_tablename' by using 
'mysql_fetch_rows' and remove all JavaScript code from the phpMyAdmin 
page 'left.php' then we get a correct view in the left frame. But if I 
click on a link, the game starts over in the other frame :(

Solaris 8 on a Netra AC200.
Apache is 1.3.20, PHP 4.0.6 static compiled into Apache.
We installed the last MySQL for Solaris 8 (3.23.41)
We tried old and new phpAdmin's, copying the older version from a 
running Linux server.

Does Apache with static compiled PHP not work on Solaris 8?
Since the pages behave really crazy, we think it has something to do 
with our PHP.
Does someone have a similar installation - which versions?
Or any help?


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]




[PHP] mysql_db_name not working

2001-08-16 Thread Peter Ostry

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."";
}
-
// 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 . "";
}
-

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]