Posted by Colin McKinnon on 11/19/56 11:47
TristaSD wrote:
> 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.
>
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'
HTH
C.
[Back to original message]
|