事务能否嵌套,如何嵌套

浏览:2787 发布日期:2015/12/27 分类:求助交流
比如我的模型类已经使用了事务        $this->startTrans();
        $data['money'] = array('exp','money+'.$money);
        if($this->where('uid='.$uid)->save($data))
        {            
            $check = D('Account')->addLog($uid,1,'抢币',$description,$money);
            if($check)
            {
                $this->commit();
                return $check;
            }
            else
                $this->rollback();
        }
        return false;
我调用该模型的时候
$mm = D("Member");
$mm -> startTrans();//能否这样再次使用事务,他们会互相作用吗?有什么特殊影响
最佳答案
评论( 相关
后面还有条评论,点击查看>>