php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54405 FETCH_GROUP always operates on first column
Submitted: 2011-03-28 04:51 UTC Modified: 2011-12-05 07:26 UTC
Votes:5
Avg. Score:3.4 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: php at bucksvsbytes dot com Assigned:
Status: Open Package: PDO related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at bucksvsbytes dot com
New email:
PHP Version: OS:

 

 [2011-03-28 04:51 UTC] php at bucksvsbytes dot com
Description:
------------
---
From manual page: http://www.php.net/pdostatement.fetchall#Parameters
---
The following statement is misleading/incorrect, "To return an associative array grouped by the values of a specified column, bitwise-OR PDO::FETCH_COLUMN with PDO::FETCH_GROUP."

It's apparent that FETCH_GROUP only groups on the first query column, so "a specified" should be replaced with "the first".


Patches

php-bug-54405.patch (last revision 2011-05-01 23:28 UTC by jinmoku at hotmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-02 01:29 UTC] jinmoku at hotmail dot com
Or maybe add a fetch.column for FETCH_GROUP (see path)
 [2011-12-05 07:26 UTC] frozenfire@php.net
-Type: Documentation Problem +Type: Feature/Change Request -Package: Documentation problem +Package: PDO related
 [2011-12-05 07:26 UTC] frozenfire@php.net
This seems like more of a bug/feature request, since the current behavior is near 
useless. After (if) it's been patched, please change this bug to a documentation 
problem bug type, so the change and new behavior can be documented.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 18:01:23 2019 UTC