DB_DataObject and Transactions
| From: | Marc Ende | Date: | Sun, 04 Apr 2004 17:00:29 +0000 |
| Subject: | DB_DataObject and Transactions | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11611@lists.php.net to get a copy of this message | ||
Hi,
I'm currently trying to use DataObjects with Transactions.
I'm planning to do this:
* BEGIN TRANSACTION
* Insert into Table A
* Insert into Table B (Table B has an Foreign Key to Table A)
* COMMIT
If the second insert fails a rollback should run.
Is this possible with the DataObject? Should I do this on the
databasehandler wich I got from the getDatabaseConnection()??
Thanks for your help...
M.