Re: false No rows returned error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: false No rows returned error
Дата
Msg-id 25863.1016903617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на false No rows returned error  (Jim Martinez <jjm@bigbigorg.org>)
Список pgsql-sql
Jim Martinez <jjm@bigbigorg.org> writes:
> I am getting a No rows returned error from a php script when there are
> rows.

I don't think so ...

> // script dies here (line 36), falling to the exit clause.
> // A warning is printed also : 
> // Warning: Supplied argument is not a valid 
> // PostgreSQL result resource 

I think that warning is what to pay attention to, and not the fact
that your script falls over when pg_numrows then chooses to return 0.

I don't know enough about PHP to know what you did wrong, but apparently
$res does not contain the kind of object pg_numrows expects.  I think
it's a PHP problem, not an SQL issue at all.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Jim Martinez
Дата:
Сообщение: false No rows returned error
Следующее
От: "Dan Langille"
Дата:
Сообщение: Re: false No rows returned error