ThinkPHP3.0完全开发手册
ThinkPHP支持查询或者更新的锁定,只需要在查询或者更新之前使用lock方法即可。
查询锁定使用:
$list = $User->lock(true)->where('status=1')->order('create_time')->limit(10)->select();
更新锁定使用:
$list = $User->lock(true)->where('status=1')->data($data)->save();
NetPc