You can call the mysql_field_seek() function to search for a column in a result set row.
Syntax
MYSQL_FIELD_OFFSET
mysql_field_seek(MYSQL_RES *result,
MYSQL_FIELD_OFFSET offset)
Return values
The previous value of the row cursor is returned.
Errors
None.
Notes
mysql_field_seek()sets the field cursor to the givenoffset. The next call tomysql_fetch_field()retrieves the field definition of the column associated with this offset.To search for the beginning of a row, set the offset to 0.