If you’re looking 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 the above approach degrades with no issues on myisam tables, coding following the this convention would appear to be a good idea for apps thinking of a postgres upgrade path.








August 4th, 2006 at 5:02 am
Realy good idea got another thing from here to extract the database connection from a dataobject.