Re: Need help with pg_result_error() function

From: Date: Tue, 15 Apr 2003 06:43:47 +0000
Subject: Re: Need help with pg_result_error() function
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-27090@lists.php.net to get a copy of this message
On Monday 14 April 2003 22:27, John Burski wrote: > I'm a relative newbie to PHP and I'm having a bit of trouble with the > pg_result_error() function. I' running PHP version 4.2.2 on Red Hat 8.0 > with PostgreSQL 7.2. > > Here's what I've tried: > > First I tried something like > > $result = pg_query( $this->linkid, $query ); > if ( $result == FALSE 0 { > $this->errmsg = pg_result_error($result); > return; > } > > But that returned an error message: > Warning: pg_result_error() expects parameter 1 to be resource, boolean > given in .... Read carefully what the error message says -- it expects a RESOURCE. Then RTFM on the following: pg_query() -- especially the first two sentences pg_last_error() pg_result_error() -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db ------------------------------------------ /* When in doubt, tell the truth. -- Mark Twain */

« previous php.db (#27090) next »