note 89030 deleted from pdostatement.nextrowset by danbrown
| From: | danbrown@php.net | Date: | Wed, 18 Feb 2009 20:18:16 +0000 |
| Subject: | note 89030 deleted from pdostatement.nextrowset by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150818@lists.php.net to get a copy of this message | ||
Note Submitter: Michaelmoe
----
Just want to point out one thing that I think mistake. According to you reference, fetch method of
statement class fetch a row. not a resultset. So it is wrong to use that method in above example
when you intention is to retrieve resultset. It should be fetchAll. Here's the snippet of code
which I'm referring to.
[Quote]
do {
$rowset = $stmt->fetch(PDO::FETCH_NUM);
if ($rowset) {
printResultSet($rowset, $i);
}
$i++;
[/Quote]