Re: how to use $result->ruseltStatus

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Randall Perry <rgp(at)systame(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: how to use $result->ruseltStatus
Date: 2001-05-08 02:56:59
Message-ID: 26908.989290619@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Randall Perry <rgp(at)systame(dot)com> 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Palle Girgensohn 2001-05-08 14:16:31 Re: Trouble with JDBC2 ResultSet.getDate()
Previous Message Randall Perry 2001-05-08 02:12:18 how to use $result->ruseltStatus