On Thu, 24 Jul 2008 12:30:22 +0200
"Leif B. Kristensen" <[EMAIL PROTECTED]> wrote:

> On Thursday 24. July 2008, admin wrote:

> >while ($row = pg_fetch_array($query)) {
> >   $content = $row[0]
> >}
> >
> >echo $content;
> >
> >$content was always 'undeclared'.
> 
> You have to use an intermediate variable like a handle. Try this:
> 
> $handle = pg_query("SELECT whatever FROM foo");
> while ($row = pg_fetch_array($handle) {
>     $content = $row[0];
> }

[EMAIL PROTECTED]:~$ php -a
Interactive mode enabled

<?php
echo pg_fetch_array($pippo);

Warning: pg_fetch_array() expects parameter 1 to be resource, null
given in /home/ivan/- on line 2

Call Stack:
   18.3923    1079256   1. {main}() /home/ivan/-:0
   18.3924    1079528   2. pg_fetch_array() /home/ivan/-:2

It can't be the problem. BTW even passing a string will end up in
the same error.

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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to