Re: pear::db, INNO DB and transactions

From: Date: Mon, 15 Dec 2003 11:55:41 +0000
Subject: Re: pear::db, INNO DB and transactions
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9526@lists.php.net to get a copy of this message
It's a return by refernce on overloaded object issue! - bug in the php4 overload engine. just turn of overload - I'm considering making this the default as it seems to be causing to many problems.
that's sorted the problem, thanks. for those interested, by way of a summary of the previous posts to this thread, in order to get db_dataobject and transactions working with mysql and the inno db table type, try the following: 1. define('DB_DATAOBJECT_NO_OVERLOAD', true); // somewhere in your script 2. $oUser = new DataObjects_Usr(); // call your dataobject 3. $dbh = & $oUser->getDatabaseConnection(); // get a db handle, reference essential! 4. $dbh->autocommit(); // set autocommit to false 5. ... your queries ... 6. $dbh->rollback()/$dbh->commit(); // called depending on your logic Seeing as this degrades with no issues on myisam tables, coding following the above convention would appear to be a good idea for apps thinking of a postgres upgrade path. cheers demian

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