mysql_fetch_field expects a column number and only returns results that are in the result set.
(unless I misunderstood how to use mysql_fetch_field)
not all queries will have primary key ex:
mysql_query( "select foo as MyFoo, bar from mytable where x > 4 order by y" )
I need something that will tell me the primary key regardless of whether or not it is in the original query.