note 101080 deleted from pdostatement.fetchobject by thiago
| From: | thiago@php.net | Date: | Thu, 25 Nov 2010 00:23:31 +0000 |
| Subject: | note 101080 deleted from pdostatement.fetchobject by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174339@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
By default the constructor of the class is called after the fields are populated.
PDO::FETCH_PROPS_LATE used to change the behaviour and make it work as expected - the object fields
will be populated with the data _after_ the constructor call.
$PDO->query($sql,PDO::FETCH_PROPS_LATE )->fetchObject('ClassName');