Re: php + postgresql

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: php + postgresql
Date: 2008-07-24 10:52:04
Message-ID: 20080724125204.5c8170b8@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 24 Jul 2008 19:11:36 +0930
admin <mick(at)mjhall(dot)org> wrote:

> 2.
> Another problem was that no matter how many times I checked and
> re-checked code, or which pg_fetch_* function I used, copying an
> array member and trying to use it later just would not work, eg
>
> while ($row = pg_fetch_array($query)) {
> $content = $row[0]
> }
>
> echo $content;
>
> $content was always 'undeclared'.

Did the result contain at least 1 row?
Also prefer column names. If you change the schema, order etc...
you'll have less chances to break code.

What do you mean by 'undeclared'?

if(!isset($content)) ?

or just

echo $content doesn't return output?

what about
$content .= $row[0]." # ";
for quick debugging?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2008-07-24 11:08:54 Re: php + postgresql
Previous Message Leif B. Kristensen 2008-07-24 10:30:22 Re: php + postgresql