Counting Database Fields

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

Threaded View
I am trying to build a sortable list of rows pulled from MySQL.  I need
a programmatic header that would allow sorting of records.  Because
order in which the fields are displayed might change, I need to learn
how to refer to field names programmatically.


Re: Counting Database Fields

TristaSD wrote:

Quoted text here. Click to load it

if you do mysql_fetch_assoc() you'll get an associative array where the keys
are the attributes from the query.

You can also treat the output of 'DESC mytable' in much the same way you
would 'SELECT fld1, other FROM some_data'



Site Timeline