From: scott.marlowe <scott.marlowe@ihs.com>
To: Zhidian Du <zdu@cs.nmsu.edu>
Cc: pgsql-php@postgresql.org <pgsql-php@postgresql.org>
Subject: Re: How can I get metadate of a table in PHP3?
Date: Tue, 3 Sep 2002 11:04:29 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0209031102370.7685-100000@css120.ihs.com> (raw)
In-Reply-To: <3D71AF16.E4216C05@cs.nmsu.edu>
On Sun, 1 Sep 2002, Zhidian Du wrote:
> Hi:
>
> How can I get metadate of a table in PHP3?
I haven't driven PHP V3 since V4 came out, so I'm not sure if these are
supported, but try these commands:
pg_field_name()
pg_field_type()
You can do a "select * from table limit 1" to get a sample row. Then use
pg_num_rows() to find out how many rows you have and iterate the name and
type functions over each field to find out.
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: scott.marlowe@ihs.com, zdu@cs.nmsu.edu
Subject: Re: How can I get metadate of a table in PHP3?
In-Reply-To: <Pine.LNX.4.33.0209031102370.7685-100000@css120.ihs.com>
References: <3D71AF16.E4216C05@cs.nmsu.edu> <Pine.LNX.4.33.0209031102370.7685-100000@css120.ihs.com>
* 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