PDF (US Ltr)- 1.1Mb
PDF (A4)- 1.1Mb
HTML Download (TGZ)- 135.1Kb
HTML Download (Zip)- 144.8Kb
my_ulonglong mysql_num_rows(MYSQL_RES *result)
Returns the number of rows in the result set.
The use ofmysql_num_rows()
depends on whether you usemysql_store_result()
ormysql_use_result()
to return the result set. If you usemysql_store_result()
,mysql_num_rows()
may be called immediately. If you usemysql_use_result()
,mysql_num_rows()
does not return the correct value until all the rows in the result set have been retrieved.
mysql_num_rows()
is intended for use with statements that return a result set, such asSELECT
. For statements such asINSERT
,UPDATE
, orDELETE
, the number of affected rows can be obtained withmysql_affected_rows()
.