You can call the mysql_field_tell() function to return the position of the field cursor used for the last mysql_fetch_field() call.
Syntax
MYSQL_FIELD_OFFSET
mysql_field_tell(MYSQL_RES *result)
Return values
The current offset of the field cursor is returned. This value can be used as a argument of mysql_field_seek().
Errors
None.