Re: How to view the structure of a table
| From: | Chris Garaffa | Date: | Sun, 30 Nov 2003 20:02:14 +0000 |
| Subject: | Re: How to view the structure of a table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171413@lists.php.net to get a copy of this message | ||
On Nov 30, 2003, at 2:07 PM, narayanan wrote:
Can any tell me how to view the structure of a table from php. I am using postgresql database.A Google search for postgresql describe table revealed this as the first result: http://forums.devshed.com/t38544/s.html Quote: "To get fields from a table unfortunately, there is no simple command. But, you can query the PostgreSQL internal tables such as pg_class for that info:" You can then use the PostgreSQL functions (documentation at <http://us3.php.net/manual/en/ref.pgsql.php>) to go through the results. HTH -- Chris Garaffa chris@nilzero.com