Re: DB_Dataobject, INNO DB and transactions

From: Date: Fri, 12 Dec 2003 17:37:54 +0000
Subject: Re: DB_Dataobject, INNO DB and transactions
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9492@lists.php.net to get a copy of this message
hi Filippo i've just tested your patch and it restores the transaction behaviour to give the expected result, good stuff. I couldn't figure out either why callling a reference to the first dataobject didn't work, putting both the first and second object through a var_dump gives the same mysql resource id for each one so it should work. cheers Demian Filippo Veneri wrote:
On Fri, 2003-12-12 at 12:37, Demian Turner wrote:
... anyone got transactions working with dataobjects? ...
Yes I did. The code I've used is attached, but don't ask me why it works. It is a mere workaround. In theory, the code in DataObject.php is correct: function &getDatabaseConnection() { global $_DB_DATAOBJECT; $this->_connect(); $md5 = $this->_database_dsn_md5; return $_DB_DATAOBJECT['CONNECTIONS'][$md5]; } but in practice it does not return the correct object. Inlining the code of this function to obtain a reference to a DB object solved the problem. The question now is: why the above function does not work? cheers Filippo


« previous php.pear.general (#9492) next »