DB_result::numRows() -- Gets number of rows in a result set
Leírás
Get the number of rows in a result set.
| Figyelem |
For ibase, ifx and
oci8, this method only works if the
DB_PORTABILITY_NUMROWS
portability option is enabled.
In addition, for ibase and
ifx, PEAR DB must be at version
1.7.0 or greater.
Does not work for Microsoft Access.
|
Visszatérési érték
integer - number of rows
or a DB_Error object on failure
Megjegyzés
Ez a függvény nem hívható
statikusan.
Példa
Példa 35-1. Using numRows()
<?php
// Once you have a valid DB object named $db...
$res =& $db->query('SELECT * FROM phptest');
echo $res->numRows();
?>
|
|