From 5756573d8d420eed1dfc8c01875ee5ce8e009e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 24 Nov 2021 16:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Traits/QueryTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/QueryTrait.php b/src/Traits/QueryTrait.php index 044cc72..15821f1 100644 --- a/src/Traits/QueryTrait.php +++ b/src/Traits/QueryTrait.php @@ -522,7 +522,7 @@ trait QueryTrait $conditionArray = $this->sprintf($conditionArray, $value, $opera); } - $this->where = ['(' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . ')']; + $this->where = ['((' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . '))']; return $this; } @@ -865,7 +865,7 @@ trait QueryTrait } else { $generate->where($closure); } - return '(' . $generate->getSql() . ')'; + return $generate->getSql(); }