Re: php + postgresql
| От | Ivan Sergio Borgonovo |
|---|---|
| Тема | Re: php + postgresql |
| Дата | |
| Msg-id | 20080724125204.5c8170b8@dawn.webthatworks.it обсуждение исходный текст |
| Ответ на | php + postgresql (admin <mick@mjhall.org>) |
| Список | pgsql-general |
On Thu, 24 Jul 2008 19:11:36 +0930
admin <mick@mjhall.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
В списке pgsql-general по дате отправления: