tp3.2 多表事物

TP3.2 事物

TP3.2 默认开启多表事物

public function testTrans(){
        $Model = M('t1');
        $Model->startTrans();
        $a = M('t2')->where('id=1')->save([
            'na'=>'aaa',
        ]);
        var_dump($a);
        $Model->rollback();
       //t2表发生更新     
    }

猜你喜欢

转载自blog.csdn.net/pwjiferox/article/details/79188357