MDB transactions in pgsql driver

From: Date: Wed, 28 May 2003 08:54:41 +0000
Subject: MDB transactions in pgsql driver
References: 1  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-16764@lists.php.net to get a copy of this message
> From: Jeroen Houben [mailto:jeroen@terena.nl] > Sent: Wednesday, May 28, 2003 10:43 AM > >Ok I hope I solved the issue. Your hint with in_transaction not being > >set was correct. Try and see if things work now. I don't have time to > >check myself atm :-/ > > > > > I replaced the stable pgsql.php and common.php with the CVS versions and > now I get other errors not related to the replace method. > > Notice: Undefined index: Coordinators in > /usr/local/share/php/pear/MDB/pgsql.php on line 1267 > Warning: pg_numrows(): supplied argument is not a valid PostgreSQL > result resource in /usr/local/share/php/pear/MDB/pgsql.php on line 799 > Warning: pg_freeresult(): supplied argument is not a valid PostgreSQL > result resource in /usr/local/share/php/pear/MDB/pgsql.php on line 823 Hmm ok these errors happen when you pass an already free result to one of the fetch methods. Could you try to pin point the exact location in your code. Also remember that all [get|query|fetch][one|row|col|all] methods free the result .. ALWAYS! This is not properly documented. So calling $arr = $mdb->fetchRow($result); will fetch a single row and then free the result set. I am aware of the fact that this is confusing users and I will address it with a new major release that will happen end if june early july. Regards, Lukas

« previous php.pear.dev (#16764) next »