Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D469B475450 for ; Sat, 23 Mar 2002 12:13:59 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g2NHDcS25866; Sat, 23 Mar 2002 12:13:38 -0500 (EST) To: Jim Martinez Cc: pgsql-sql@postgresql.org Subject: Re: false No rows returned error In-reply-to: References: Comments: In-reply-to Jim Martinez message dated "Sat, 23 Mar 2002 11:04:21 -0500" Date: Sat, 23 Mar 2002 12:13:37 -0500 Message-ID: <25863.1016903617@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200203/290 X-Sequence-Number: 7169 Jim Martinez 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