Search Postgresql Archives

Re: php + postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Jul 2008 19:11:36 +0930
admin <mick@xxxxxxxxxx> 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux