From a66b7bf4502f0c36ff87770af99ec425bb3a990e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 24 Feb 2021 18:50:04 +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 --- Database/Orm/Condition.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Database/Orm/Condition.php b/Database/Orm/Condition.php index 4ef49232..113e1398 100644 --- a/Database/Orm/Condition.php +++ b/Database/Orm/Condition.php @@ -81,9 +81,13 @@ trait Condition $_tmp = []; if (empty($where)) return ''; - foreach ($where as $value) { - $_value = is_string($value) ? $value : $this->conditionMap($value); + foreach ($where as $key => $value) { + if (is_string($key)) { + $_tmp = $this->conditionMap([$key, $value]); + break; + } + $_value = is_string($value) ? $value : $this->conditionMap($value); if (empty($_value)) continue; $_tmp[] = $_value;