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 50933D1B56C for ; Wed, 13 Aug 2003 17:18:27 +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 41172-05 for ; Wed, 13 Aug 2003 14:16:51 -0300 (ADT) Received: from freesurfmail.sunrise.ch (freesurfmta06.sunrise.ch [194.230.0.34]) by svr1.postgresql.org (Postfix) with ESMTP id 60065D1B58A for ; Wed, 13 Aug 2003 14:18:16 -0300 (ADT) Received: from naboo (62.167.53.52) by freesurfmail.sunrise.ch (6.0.055) id 3F396C960001C0E3 for pgsql-php@postgresql.org; Wed, 13 Aug 2003 19:19:02 +0200 From: "Jonas Vonlanthen" To: Subject: problems when fetching array contents. Date: Wed, 13 Aug 2003 19:18:14 +0200 Message-ID: <000001c361be$e1ea8730$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-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/52 X-Sequence-Number: 2229 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 = tep_db_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