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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC