how to use $result->ruseltStatus

From: Randall Perry <rgp(at)systame(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: how to use $result->ruseltStatus
Date: 2001-05-08 02:12:18
Message-ID: B71CCE41.B1D3%rgp@systame.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I want to make sure queries returned aren't empty. Tried this:

$conn = Pg::connectdb("dbname=$db");
$res = $conn->exec("$q");
$result_status = $res->resultStatus;
($result_status != PGRES_EMPTY_QUERY) ? print "query not empty\n" :
print "query empty\n";

But it returns '2' (not sure which constant it is, but it's not
PGRES_EMPTY_QUERY) on empty queries.

What's the right use of this property?

--
Randy Perry
sysTame
Mac Consulting/Sales

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2001-05-08 02:56:59 Re: how to use $result->ruseltStatus
Previous Message Hiroshi Inoue 2001-05-08 00:26:02 Re: using decimal type - unable to identify operator =