Doc #51809 [Com]: Missing information in PDOStatement->fetchAll docs
| From: | chealer at gmail dot com | Date: | Thu, 08 Oct 2015 15:44:45 +0000 |
| Subject: | Doc #51809 [Com]: Missing information in PDOStatement->fetchAll docs | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12815@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51809&edit=1
ID: 51809
Comment by: chealer at gmail dot com
Reported by: smrank at zepler dot org
Summary: Missing information in PDOStatement->fetchAll docs
Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: 5.3.2
Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
More fixes to PDOStatement::fetchAll have been requested in ticket #70672.
Previous Comments:
------------------------------------------------------------------------
[2010-10-25 19:10:48] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
------------------------------------------------------------------------
[2010-10-25 19:10:44] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304883
Log: Fixed bug #51809 (Missing information in PDOStatement->fetchAll docs)
------------------------------------------------------------------------
[2010-10-23 20:38:00] frozenfire at thefrozenfire dot com
In the source for the PDOStatement class, in the PDO extension
(http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo/pdo_stmt.c?view=markup#l1422), the naming of
the second argument is ambiguous. The proto refers to it as "string class_name", and the
method's code refers to it as arg2.
In the documentation, I suggest we rename that argument to "mixed $index_or_classname"
with some indication of the default value for each PDO::FETCH_* type.
------------------------------------------------------------------------
[2010-05-13 13:09:06] smrank at zepler dot org
Description:
------------
On the following page for PDOStatement->fetchAll, the text leaves out some pretty important
information:
http://uk2.php.net/manual/en/pdostatement.fetchall.php
If the first argument is PDO::FETCH_COLUMN then the second argument is treated as the column index
(this is mentioned on the page). However, if the first argument is PDO::FETCH_CLASS then the second
argument is treated as the class name, this is not mentioned at all as far as I can see. The page
does say that these fetch styles are documented on the fetch() page but that doesn't help since
AFAICS fetch() doesn't allow the class name to be specified as the second argument, that
feature is specific to fetchAll().
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51809&edit=1