note 110452 deleted from mysqli-result.num-rows by aharvey
| From: | aharvey@php.net | Date: | Wed, 24 Oct 2012 03:37:12 +0000 |
| Subject: | note 110452 deleted from mysqli-result.num-rows by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191511@lists.php.net to get a copy of this message | ||
Note Submitter: ColinC
----
The reason for mysqli_num_rows() not returning the total number of results but the number of
traversed results is because you are using unbuffered result sets.
This is explained...
"The behaviour of mysqli_num_rows() depends on whether buffered or unbuffered result sets are
being used. For unbuffered result sets, mysqli_num_rows() will not return the correct number of rows
until all the rows in the result have been retrieved."