Re: MDB2 and transactions
| From: | Lukas Kahwe Smith | Date: | Sat, 16 Sep 2006 22:31:51 +0000 |
| Subject: | Re: MDB2 and transactions | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25151@lists.php.net to get a copy of this message | ||
Martin Marques wrote:
In PEAR::MDB2 is it mandatory to do a beginTransaction() commit() to work with transactions? In PEAR::DB I used to set autocommit(false) and every time I executed a query with an INSERT, UPDATE or DELETE PEAR::DB started a new transaction which I finished with a commit(). How should I go with MDB2?I have not implemented autocommit mode disabling in MDB2. Instead you need to explicitly start a transaction to disable autocommit mode. The documentation for transactions is complete: http://pear.php.net/manual/en/package.database.mdb2.intro-transaction.php regards, Lukas