Is there something that returns the name of column names in a MySQL table?
Indeed there is:
string msql_fieldname(int query_identifier, int field);
Right there on the mysql manual page for PHP...