Need help with pg_result_error() function

From: Date: Mon, 14 Apr 2003 14:27:37 +0000
Subject: Need help with pg_result_error() function
Groups: php.db 
Request: Send a blank email to php-db+get-27082@lists.php.net to get a copy of this message
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 .... Then I tried something like $result = pg_query( $this->linkid, $query ); if ( $result == FALSE 0 { $this->errmsg = pg_result_error(0); // I made sure that parameter 1 is a zero return; } But that returned the error message: Warning: pg_result_error() expects parameter 1 to be resource, integer given in .... I'm sure that I'm missing something obvious, but I can't figure out what it could be. Any help would be greatly appreciated. Thanks -- John Burski @HOME S.I.M.U. (Well, sometimes I am :) ) ... and still searching for the cheese!

« previous php.db (#27082) next »