Need help with pg_result_error() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux