Re: list fieldnames in table? (from PHP)

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Scott Marlowe <smarlowe(at)qwest(dot)net>
Cc: Miles Keaton <mileskeaton(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: list fieldnames in table? (from PHP)
Date: 2004-10-27 02:52:18
Message-ID: 417F0D62.20805@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe wrote:

>On Mon, 2004-10-25 at 20:36, Miles Keaton wrote:
>
>
>>Is there a simple way to list fieldnames in a table, from PHP?
>>
>>When on the command-line, I just do \d tablename
>>
>>But how to get the fieldnames from PHP commands?
>>
>>
Hello,

This PHP function will give you what you need:

http://us2.php.net/manual/en/print/function.pg-field-name.php

Sincerely,

Joshua D. Drake

>
>In addition to the other ideas given here, you also have the SQL spec
>standard information_schema to examine
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2004-10-27 02:53:36 Re: Newbie question about casting literals - oracle/postgres
Previous Message Scott Marlowe 2004-10-27 02:27:31 Re: [Fwd: Abrupt close of pgsql backend]