note 117980 added to pdostatement.fetchall
| From: | info at yuriblanc dot it | Date: | Mon, 14 Sep 2015 12:49:01 +0000 |
| Subject: | note 117980 added to pdostatement.fetchall | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203775@lists.php.net to get a copy of this message | ||
Something missing in the doc.
If for instance you try to fetchAll(PDO::CLASS, "Class") it sometimes return an array of
objects with NULL values, but the count of objects fetched correspond to table rows.
In this way works fine:
fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, "Class");
For example
$stm = $pdo->prepare("SELECT * FROM Fruit");
$stm->execute();
$stm->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, "Fruit");
----
Server IP: 72.52.91.14
Probable Submitter: 217.18.110.65
----
Manual Page -- http://php.net/manual/en/pdostatement.fetchall.php
Edit -- https://master.php.net/note/edit/117980
Del: integrated -- https://master.php.net/note/delete/117980/integrated
Del: useless -- https://master.php.net/note/delete/117980/useless
Del: bad code -- https://master.php.net/note/delete/117980/bad+code
Del: spam -- https://master.php.net/note/delete/117980/spam
Del: non-english -- https://master.php.net/note/delete/117980/non-english
Del: in docs -- https://master.php.net/note/delete/117980/in+docs
Del: other reasons-- https://master.php.net/note/delete/117980
Reject -- https://master.php.net/note/reject/117980
Search -- https://master.php.net/manage/user-notes.php