6.19 查询锁定匿名 · 更新于 2013/12/25ThinkPHP支持查询或者更新的锁定,只需要在查询或者更新之前使用lock方法即可。 查询锁定使用: $list = $User->lock(true)->where('status=1')->order('create_time')->limit(10)->select(); 更新锁定使用: $list = $User->lock(true)->where('status=1')->data($data)->save(); 上一篇8.19 Define标签下一篇8.20 Assign标签