码迷,mamicode.com
首页 > 其他好文 > 详细

YII 中的事务处理机制

时间:2014-07-01 00:01:03      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   art   

$model=Post::model();
$transaction=$model->dbConnection->beginTransaction(); 
try$post=$model->findByPk(10);  
  $post->title=‘new post title‘;  
  $post->save();  
  $transaction->commit(); 
}catch(Exception $e){
    $transaction->rollBack(); 
}

摘至:http://blog.csdn.net/xinqingch/article/details/8186745

YII 中的事务处理机制,布布扣,bubuko.com

YII 中的事务处理机制

标签:style   blog   http   color   os   art   

原文地址:http://www.cnblogs.com/dqmore/p/3815910.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!