mysql_num_rows()
int mysql_num_rows(MYSQL_RES *result)
This function returns the number of rows in the results set
when issued after the mysql_store_result()
function. When issued after
mysql_use_result(), it returns the number of
rows already fetched. Here is an example:
... my_ulonglong num_rows = mysql_num_rows(result); ...
See mysql_list_fields() earlier in this
section for a more elaborate example that uses this function.