Name
mysql_num_rows
Synopsis
int mysql_num_rows(MYSQL_RES *result)
Returns the number of rows of data in the result set. This function
is only accurate if the result set was retrieved with
mysql_store_result
. If
mysql_use_result
was used, the value returned by
this function will be the number of rows accessed so far.
Example
num_rows = mysql_num_rows(results); printf("There were %d rows returned\n", num_rows);
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.