From 1289cf142e0a577284e2150ed3776bf4db284665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 14 Jan 2021 14:24:02 +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/Traits/QueryTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/Traits/QueryTrait.php b/Database/Traits/QueryTrait.php index a39ad630..39a37b8f 100644 --- a/Database/Traits/QueryTrait.php +++ b/Database/Traits/QueryTrait.php @@ -83,7 +83,7 @@ trait QueryTrait */ public function locate(string $column, string $value): static { - $this->where[] = 'LOCATE(' . $column . ',\'' . addslashes($value) . '\')'; + $this->where[] = 'LOCATE(' . $column . ',\'' . addslashes($value) . '\') > 0'; return $this; }