X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id AA877D1B58A for ; Wed, 13 Aug 2003 18:05:29 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 48359-07 for ; Wed, 13 Aug 2003 15:03:53 -0300 (ADT) Received: from server707.alcosoft.com (unknown [216.10.13.129]) by svr1.postgresql.org (Postfix) with ESMTP id BCADAD1B561 for ; Wed, 13 Aug 2003 15:05:18 -0300 (ADT) Received: from adsl-62-167-53-52.adslplus.ch ([62.167.53.52] helo=naboo) by server707.alcosoft.com with esmtp (Exim 4.20) id 19mzzj-0008M3-3K for pgsql-php@postgresql.org; Wed, 13 Aug 2003 20:05:11 +0200 From: "J0nEz" To: Subject: error was in last email: problems when fetching array contents. Date: Wed, 13 Aug 2003 20:05:15 +0200 Message-ID: <000801c361c5$74ac8220$2201a8c0@naboo> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server707.alcosoft.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - frizone.ch X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/50 X-Sequence-Number: 2227 Hello, I'm having problems fetching array contents. Connection to my db is alright, the db data too. Here is the problem: I have a table named "configuration" containing Keys and Values of Constants that have to be defined in php. The code: $configuration_query = pg_query("select configuration_key as cfgKey, configuration_value as cfgValue from configuration"); while ($configuration = pg_fetch_array($configuration_query)) { echo $configuration['cfgKey']; $configuration['cfgValue']; // test define($configuration['cfgKey'], $configuration['cfgValue']); } The problem I have is that although it passed through the while LOOP the right number of times (= the number of entries in the table), I'm not able to print any key or value (when I test using "echo $configuration['cfgKey']..., it just writes nothing), and the php constants are therefore not defined. "configuration_key" and "configuration_value" are varchar(64) Any one knows how to handle this? I'm using postgre 7.3.2 and php 4.3.1. Thanks in advance, Best Regards. Jonas Vonlanthen