mysql_num_fields — returns number of fields in a result set
unsigned int mysql_num_fields(MYSQL_RES * );
Returns number of fields in a specified result set.
Parameters
A result set identifier returned by mysql_store_result()
or mysql_use_result()
.
Return value
The number of fields in a result set.
See also
mysql_fetch_field()