Mysql help

Miscellaneous Forums/General Discussion/Mysql help

You can use mysql_field_name() to get the name of a field, given a result set and field index... which I imagine you could then pass into your SELECT statement.

Of course, it would mean pre-fetching something from the required table, which you could then cache and use from an Array.