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