From 923c6657ad7bfe43b57f592d22e486a8aeb07bfd Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 31 May 2016 16:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84lock?= =?UTF-8?q?=E6=96=B9=E6=B3=95=20=E6=94=AF=E6=8C=81=E4=B8=BB=E4=BB=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 0f542ec8..bf883a83 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1051,7 +1051,8 @@ class Query */ public function lock($lock = false) { - $this->options['lock'] = $lock; + $this->options['lock'] = $lock; + $this->options['master'] = true; return $this; }