给Magento的模块保存添加事务(transaction)

$transactionSave = Mage::getModel('core/resource_transaction');
$transactionSave->addObject($model_one)
$transactionSave->addObject($model_two)
$transactionSave->save();


PS:偷懒下,只贴代码了大笑

你可能感兴趣的:(Magento)