At 13:38 09.03.2003, Nik Makepeace said: --------------------[snip]-------------------- >Can anyone tell me why this doesn't work: > >$db_object = pg_fetch_object($this->getLastResult()); > >In imaginary interactive mode, it works like this: > >ME > echo $this->getLastResult(); >PHP> Resource id #67 >ME > echo $this->mr_lastResult; >PHP> Resource id #67 >ME > echo pg_fetch_object($this->getLastResult()); >PHP> >ME > echo pg_fetch_object($this->mr_lastResult); >PHP> > >Any ideas? --------------------[snip]--------------------
From the docs: pg_fetch_object() returns an object with properties that correspond to the fetched row. It returns FALSE if there are no more rows or error. The behaviour of your code is expected if you looped either past the returned records, or there are no records returned by the previous query. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php