Displaying column data types in a table?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
If I want to determine what data types a table has, how would I do this
using PHP?

I tried looking into SHOW TABLES but would I be correct in saying that
just displays a list of tables? I want some way of analizing a single
table and outputing the column data types. Btw, I am using a PostgreSQL



Re: Displaying column data types in a table?

Don't know a whole lot about PostgreSQL, but you could probably execute
a query like:

select * from some_table

Then use pg_field_type() on the result:


Re: Displaying column data types in a table?

On 22 Aug 2005 16:17:11 -0700, bissatch@yahoo.co.uk wrote:

Quoted text here. Click to load it


Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Site Timeline