From: Dan Wilson <dan_wilson@geocities.com>
To: magnus <reduct@asa.de>
To: pgsql-php@postgresql.org
Subject: Re: listing databases
Date: Wed, 1 Nov 2000 07:38:06 -0800
Message-ID: <000b01c04419$bc8ef310$078353d8@danwilson> (raw)
References: <3A0030A1.81831A88@asa.de>
Databases:
SELECT datname FROM pg_databases
Tables:
SELECT tablename FROM pg_tables WHERE tablename NOT LIKE 'pg%'
The "NOT LIKE 'pg%'" filters out the system tables.
If you are interested in learning more about the system tables, you can
download my phpPgAdmin (http://www.phpwizard.net/projects/phpPgAdmin) and
view the source code. I have to use the system tables for almost
everything. If you do not want to download it, you can check out the source
code through the snapshot page (http://pgdemo.acucore.com/snapshot).
-Dan Wilson
----- Original Message -----
From: "magnus" <reduct@asa.de>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, November 01, 2000 7: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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: dan_wilson@geocities.com, reduct@asa.de
Subject: Re: listing databases
In-Reply-To: <000b01c04419$bc8ef310$078353d8@danwilson>
References: <3A0030A1.81831A88@asa.de> <000b01c04419$bc8ef310$078353d8@danwilson>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox