From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Martinez <jjm@bigbigorg.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: false No rows returned error
Date: Sat, 23 Mar 2002 12:13:37 -0500
Message-ID: <25863.1016903617@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.33.0203230955120.7406-100000@unagi.e-techservices.com>
References: <Pine.LNX.4.33.0203230955120.7406-100000@unagi.e-techservices.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jjm@bigbigorg.org
Subject: Re: false No rows returned error
In-Reply-To: <25863.1016903617@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox