note 103099 rejected from pdostatement.fetchall by danbrown
| From: | danbrown@php.net | Date: | Fri, 25 Mar 2011 15:38:49 +0000 |
| Subject: | note 103099 rejected from pdostatement.fetchall by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178205@lists.php.net to get a copy of this message | ||
Note Submitter: php at bucksvsbytes dot com
----
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.