mysql_num_rows()
int mysql_num_rows(results)This function returns the number of rows in the results set
given, generated by issuing a SELECT statement. For
other types of SQL statements that don’t return a results set, use
mysql_affected_rows(). Here is an
example:
... $sql_stmnt = "SELECT * FROM workreq"; $results = mysql_query($sql_stmnt); $count = mysql_num_rows($results); print "Number of Rows Found: $count \n"; ...