Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7509 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68677 invoked by uid 1010); 3 Feb 2004 16:04:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68408 invoked from network); 3 Feb 2004 16:04:17 -0000 Received: from unknown (HELO mail.tiscali.cz) (213.235.135.71) by pb1.pair.com with SMTP; 3 Feb 2004 16:04:17 -0000 Received: from wbp1 (213.235.189.246) by mail.tiscali.cz (6.7.018) id 3FB96809016A3244 for internals@lists.php.net; Tue, 3 Feb 2004 17:04:16 +0100 Message-ID: <017f01c3ea70$14095ae0$d300a8c0@webpropag.cz> To: Date: Tue, 3 Feb 2004 17:09:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: A little idea about pg_fetch_all ( resource result) From: prasek@silesia.cz (=?windows-1250?Q?ing . Martin_Pr=E1=9Aek?=) In most databases an queries , there is primary key/unique constraint = so i suggest to enhnace function pg_fetch_all ( resource result) to=20 pg_fetch_all ( resource result,[string key_column_name]) bz adding a = second optional parameter, so anybody can access all returned data = like this: $data=3D pg_fetch_all ($resource,$key_column_name]); $column=3D$data['value of the key, specified in 2nd argument to = pg_fetch_all' ]['name of the column']; ie all tuples/lines from result can be accessed via associative array, = with key is the value of specified column. Yes, I think it can be done by wery simle code too, but....