Re: false No rows returned error - Mailing list pgsql-sql

From Tom Lane
Subject Re: false No rows returned error
Date
Msg-id 25863.1016903617@sss.pgh.pa.us
Whole thread Raw
In response to false No rows returned error  (Jim Martinez <jjm@bigbigorg.org>)
List 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 by date:

Previous
From: Jim Martinez
Date:
Subject: false No rows returned error
Next
From: "Dan Langille"
Date:
Subject: Re: false No rows returned error