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 */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php