Simple class to use transaction in Yii framework
copy transactionFactory.php under protected/components folder
transactionFactory::beginTransaction(); transactionFactory::commit(); transactionFactory::rollback();
- If you work with more than one model and need transaction in them,it can be useful to write less code.
- It helps you to check transaction status.