DB_result::numRows() -- Gets number of rows in a result set
Description
Get the number of rows in a result set.
Return value
integer - number of rows
or a DB_Error object on failure
Note
This function can not be called
statically.
Example
Example 26-1. Using numRows() <?php
// Once you have a valid DB object named $db...
$res =& $db->query('SELECT * FROM phptest');
echo $res->numRows();
?> |
|