From: | Dan Wilson <killroyboy(at)yahoo(dot)com> |
---|---|
To: | Adam Lang <aalang(at)rutgersinsurance(dot)com>, pgsql-php(at)postgresql(dot)org |
Subject: | Re: listing databases |
Date: | 2000-11-01 15:07:21 |
Message-ID: | 20001101150721.15601.qmail@web9503.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
I connect using the default database which is usually
template1. But you can access the system tables from
a connection into any database.
-Dan
--- Adam Lang <aalang(at)rutgersinsurance(dot)com> wrote:
> So you just connect to the database using username,
> password, host, and
> port? Don't use a dbname in the connection string?
>
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
> ----- Original Message -----
> From: "Dan Wilson" <dan_wilson(at)geocities(dot)com>
> To: "magnus" <reduct(at)asa(dot)de>;
> <pgsql-php(at)postgresql(dot)org>
> Sent: Wednesday, November 01, 2000 10:38 AM
> Subject: Re: [PHP] listing databases
>
>
> > 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(at)asa(dot)de>
> > To: <pgsql-php(at)postgresql(dot)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
>
__________________________________________________
Do You Yahoo!?
>From homework help to love advice, Yahoo! Experts has your answer.
http://experts.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Postg토토 꽁 머니SQL | Dan Wilson | 2000-11-01 15:38:06 | Postg토토 꽁 머니SQL : 토토 꽁 |
Previous Message | magnus | 2000-11-01 15:02:57 | listing databases |