September 2001
Intermediate to advanced
768 pages
32h 45m
English
int mysql_num_rows(mysql result result_handle) Gets the number of rows in a MySQL result handle.
Returns:
Integer; NULL on error
Description:
mysql_num_rows() returns the number of rows in the specified MySQL result handle.
Version:
PHP 3+, PHP 4+
See also:
To find the number of fields in a row:
mysql_num_fields()
To find the number of rows affected by a query:
mysql_affected_rows()
Example:
<?php // Included code that connects to a MySQL server and sets a default database // See the MySQL Functions chapter introduction for the source code for the file include ('mysql_connect.inc.php'); // Get the current time and UNIX timestamp $query = "SELECT * FROM user"; // Suppress errors ... |
Read now
Unlock full access