Re: DB interface problem

From: Date: Tue, 27 Oct 2009 21:46:41 +0000
Subject: Re: DB interface problem
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-46592@lists.php.net to get a copy of this message
Andy Shellam (Mailing Lists) wrote:
Hi Giff, No worries - I know the feeling well! At first glance this looks OK, however I notice that there is no "res" property defined in the STH class, like there is session and query. $this->res on line 202 is what's causing the issue - PHP is saying it's not a valid PostgreSQL result resource, so if you trace back to where that comes from, you get to line 175: $this->res = @pg_execute($this->session, $query); PHP is therefore trying to assign a query result to a property that doesn't exist. I would have expected PHP to throw an error at this but it may have been obscured with your logging settings, I'm not sure.
Close - the '@' before pg_execute is hiding the notice/warning. I'd say check your database username/password are correct. $this->session is probably not a postgres resource. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#46592) next »