Bug->Doc #53394 [Opn->Ver]: Insufficient docs regarding PDOStatement::fetch(Object) and constructors
| From: | cmb@php.net | Date: | Wed, 29 Jun 2016 10:58:55 +0000 |
| Subject: | Bug->Doc #53394 [Opn->Ver]: Insufficient docs regarding PDOStatement::fetch(Object) and constructors | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13646@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53394&edit=1
ID: 53394
Updated by: cmb@php.net
Reported by: public at grik dot net
-Summary: ARRAY_AS_PROPS flag is ignored when used with
PDOStatement::fetchObject
+Summary: Insufficient docs regarding
PDOStatement::fetch(Object) and constructors
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
-Package: Documentation problem
+Package: PDO related
PHP Version: 5.3.3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2010-11-24 23:49:28] felipe@php.net
Right, it needs be documented.
------------------------------------------------------------------------
[2010-11-24 23:32:49] public at grik dot net
It's not bogus. It is a documentation issue at least.
I guess, it needs to be described somewhere beyond the bugtracker.
all I see in docs is:
PDO::FETCH_PROPS_LATE ( integer )
Available since PHP 5.2.0
------------------------------------------------------------------------
[2010-11-24 22:16:34] felipe@php.net
Hi, there was a discussion about this, see bug #49521
You could do something like this:
$a = $PDO->query('select id from links');
$a->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'ArraySlice');
$a = $a->fetch();
var_dump($a->id, $a['id']);
Thanks.
------------------------------------------------------------------------
[2010-11-24 15:27:19] tony2001@php.net
Felipe, could you check this out plz?
------------------------------------------------------------------------
[2010-11-24 15:25:58] tony2001@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=53394
--
Edit this bug report at https://bugs.php.net/bug.php?id=53394&edit=1