Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 19282476E4F for ; Wed, 18 Dec 2002 15:58:41 -0500 (EST) Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by postgresql.org (Postfix) with ESMTP id 429CA476EF5 for ; Wed, 18 Dec 2002 15:32:22 -0500 (EST) Received: from eumel.yoo.local (pD952C4AE.dip.t-dialin.net [217.82.196.174]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id VAA25608 for ; Wed, 18 Dec 2002 21:32:06 +0100 (MET) Received: by eumel.yoo.local (Postfix on SuSE Linux 7.2 (i386), from userid 500) id 78CCE3C1F0; Wed, 18 Dec 2002 21:38:32 +0100 (CET) Date: Wed, 18 Dec 2002 21:38:32 +0100 From: Thorsten Haude To: PostgreSQL PHP ML Subject: pg_fetch_array() Message-ID: <20021218203832.GI1604@eumel.yoo.local> Mail-Followup-To: PostgreSQL PHP ML Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Warning: Email may contain unsmilyfied humor and/or satire. Keywords: Eine Botschaft for =?iso-8859-1?Q?Kuriere?= =?iso-8859-1?Q?=3A_Drogen_t=F6ten!?= Organization: Ministry of Information, Department of Information Adjustments User-Agent: Mutt/1.5.1i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/37 X-Sequence-Number: 1712 Hi, I want to read an unknown number of rows from a select result. I try this: - - - Schnipp - - - $result = pg_exec($dbh, $statement); $row = 0; while ($item = pg_fetch_array($result, $row, PGSQL_ASSOC)) { doSomething($item); $row++; } - - - Schnapp - - - However, I get an error telling me that PHP is "Unable to jump to row [$nRows + 1] on PostgreSQL result index 3 in [$file] on line [$line] What do I miss? tia, Thorsten -- Denn ein Tyrann ist nicht, wenn die Masse nicht geduldig stillhält. - Kurt Tucholsky