note 103099 added to pdostatement.fetchall
| From: | php at bucksvsbytes dot com | Date: | Fri, 25 Mar 2011 15:38:07 +0000 |
| Subject: | note 103099 added to pdostatement.fetchall | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178204@lists.php.net to get a copy of this message | ||
I'm unable to make <?php fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC) ?> work when
specifying an explicit column number.
If I use:
<?php
$stmt->setFetchMode(PDO::FETCH_GROUP|PDO::FETCH_ASSOC,4);
$results = $stmt->fetchAll();
?>
no grouping is done.
If I use:
<?php
$results = $stmt->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC,4);
?>
I get an "extraneous additional parameters" error.
If I use:
<?php
$results = $stmt->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC);
?>
grouping is done on the default column 0 as expected.
The parameter documentation appears incorrect.
----
Server IP: 69.147.83.197
Probable Submitter: 24.168.47.148
----
Manual Page -- http://www.php.net/manual/en/pdostatement.fetchall.php
Edit -- https://master.php.net/note/edit/103099
Del: integrated -- https://master.php.net/note/delete/103099/integrated
Del: useless -- https://master.php.net/note/delete/103099/useless
Del: bad code -- https://master.php.net/note/delete/103099/bad+code
Del: spam -- https://master.php.net/note/delete/103099/spam
Del: non-english -- https://master.php.net/note/delete/103099/non-english
Del: in docs -- https://master.php.net/note/delete/103099/in+docs
Del: other reasons-- https://master.php.net/note/delete/103099
Reject -- https://master.php.net/note/reject/103099
Search -- https://master.php.net/manage/user-notes.php