I don't know of a way. To connect to postgresql I think it is mandatory to
include the dbname. Even if you didn't, there is no function that lists the
DBs on the system.
Unfortunately that is something MySQL in PHP has. You can connect to jsut
the Server, and it has a function called mysql_list_dbs which returns a
result set of databases on the server.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "magnus" <reduct@asa.de>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, November 01, 2000 10:02 AM
Subject: [PHP] listing databases
> Hello,
> Can anyone tell me how to list (1.) databases and (2.) tables in a
> database using php?
> Thanks,
> Magnus Lawrie