note 63359 deleted from pdostatement.rowcount by joey
| From: | joey@php.net | Date: | Mon, 18 Jul 2011 23:04:52 +0000 |
| Subject: | note 63359 deleted from pdostatement.rowcount by joey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181675@lists.php.net to get a copy of this message | ||
Note Submitter: pcdinh at phpvietnam dot net
----
In some case you need to know how many row are retrieved from a select query (i.e to page a result
set) you can use:
$totalRows = count($resultSet->fetchAll());
It works on MySQL 5.0.18 and PHP 5.1