//thinkphp 加乐观锁lock(true),并且必须在事务中
M()->startTrans();
$info = M("Member")->where(['id' => $user_id])->lock(true)->find();
M()->commit();
thinkphp加事务锁
最新推荐文章于 2023-08-27 13:58:42 发布
//thinkphp 加乐观锁lock(true),并且必须在事务中
M()->startTrans();
$info = M("Member")->where(['id' => $user_id])->lock(true)->find();
M()->commit();