| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера