Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f482v6A03945 for ; Mon, 7 May 2001 22:57:06 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f482uxR26911; Mon, 7 May 2001 22:56:59 -0400 (EDT) To: Randall Perry cc: pgsql-interfaces@postgresql.org Subject: Re: how to use $result->ruseltStatus In-reply-to: References: Comments: In-reply-to Randall Perry message dated "Mon, 07 May 2001 22:12:18 -0400" Date: Mon, 07 May 2001 22:56:59 -0400 Message-ID: <26908.989290619@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/32 X-Sequence-Number: 1558 Randall Perry writes: > I want to make sure queries returned aren't empty. Check the number of rows returned (after checking for OK resultStatus). > But it returns '2' (not sure which constant it is, but it's not > PGRES_EMPTY_QUERY) on empty queries. PGRES_EMPTY_QUERY means you sent an empty string as the query, eg $conn->exec(""); This is pretty useless, and is distinguished only for historical reasons... regards, tom lane