Name
mysql_num_rows( )
Synopsis
mysql_num_rows(results
)
This 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( )
.
... $sql_stmnt = "SELECT * FROM workreq"; $results = mysql_query($sql_stmnt); $count = mysql_num_rows($results); print "Number of Rows Found: $count \n"; ...
Get MySQL in a Nutshell 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.