mysql_num_fields()

This returns the number of values; that is, columns in the supplied row. Here is its syntax:

unsigned int mysql_num_fields(MYSQL_ROW row)

Here, the parameter row represents the individual row that is accessed from the resultset.