Req #44757 [Asn->Opn]: use sql-id as key
| From: | kalle@php.net | Date: | Tue, 24 Oct 2017 07:58:37 +0000 |
| Subject: | Req #44757 [Asn->Opn]: use sql-id as key | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212198@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=44757&edit=1
ID: 44757
Updated by: kalle@php.net
Reported by: nobs at nobswolf dot info
Summary: use sql-id as key
-Status: Assigned
+Status: Open
Type: Feature/Change Request
Package: PostgreSQL related
PHP Version: 5.2.5
-Assigned To: yohgaki
+Assigned To:
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2008-04-17 12:24:33] nobs at nobswolf dot info
Description:
------------
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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=44757&edit=1