note 106110 added to pdostatement.setfetchmode
| From: | kernins at gmail dot com | Date: | Tue, 11 Oct 2011 13:22:33 +0000 |
| Subject: | note 106110 added to pdostatement.setfetchmode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183782@lists.php.net to get a copy of this message | ||
ronhenry at netspeed dot com dot au, PDO maps ctargs array to constructor params as is. It wont
substitute it with actual row data. At least for me on php 5.3.6 fbsd and 5.3.7.dev win.
In your example class constructor didn't recieve values of id, a and b fields of current row,
but just strings 'id', 'a' and 'b'. And then, if FETCH_PROPS_LATE was
used, class props overloaded with actual row data.
And I suppose its meant to behave exactly as it does. But, of course, it would be nice to have an
option implementing behaviour you've described...
Hope this save a bit of time for someone.
----
Server IP: 93.93.89.7
Probable Submitter: 193.200.94.112
----
Manual Page -- http://www.php.net/manual/en/pdostatement.setfetchmode.php
Edit -- https://master.php.net/note/edit/106110
Del: integrated -- https://master.php.net/note/delete/106110/integrated
Del: useless -- https://master.php.net/note/delete/106110/useless
Del: bad code -- https://master.php.net/note/delete/106110/bad+code
Del: spam -- https://master.php.net/note/delete/106110/spam
Del: non-english -- https://master.php.net/note/delete/106110/non-english
Del: in docs -- https://master.php.net/note/delete/106110/in+docs
Del: other reasons-- https://master.php.net/note/delete/106110
Reject -- https://master.php.net/note/reject/106110
Search -- https://master.php.net/manage/user-notes.php