|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44757 use sql-id as key
Submitted: 2008-04-17 12:24 UTC Modified: 2017-10-24 07:58 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nobs at nobswolf dot info Assigned:
Status: Open Package: PostgreSQL related
PHP Version: 5.2.5 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.
Block user comment
Status: Assign to:
Bug Type:
From: nobs at nobswolf dot info
New email:
PHP Version: OS:


 [2008-04-17 12:24 UTC] nobs at nobswolf dot info
Let functions like pg_fetch_all use one column of the result set (most likely the primary key or another unique key) as key of the PHP-array.

Reproduce code:
// this is what I currently use

$ergebnis= pg_fetch_all($resultset);
foreach ($ergebnis as $row){
  $text[$row['id']] = $row['text'];

// this is what I would like to have

$textA= pg_fetch_all($resultset, 'id');

// just for convenience, readability and performance


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-22 13:42 UTC]
-Package: Feature/Change Request +Package: PostgreSQL related
 [2012-03-31 05:39 UTC]
-Assigned To: +Assigned To: yohgaki
 [2017-10-24 07:58 UTC]
-Status: Assigned +Status: Open -Assigned To: yohgaki +Assigned To:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 02:01:28 2024 UTC