From: | "J0nEz" <jonas(at)frizone(dot)ch> |
---|---|
To: | <pgsql-php(at)postgresql(dot)org> |
Subject: | problems when fetching array contents. |
Date: | 2003-08-13 17:24:03 |
Message-ID: | 000401c361bf$b2b378e0$2201a8c0@naboo |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Cornelia Boenigk | 2003-08-13 17:48:46 | Re: problems when fetching array contents. |
Previous Message | Jonas Vonlanthen | 2003-08-13 17:18:14 | problems when fetching array contents. |