From ff27c0de65c33c155bc03fc95946e08ec2fc4e3b Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 30 Mar 2023 23:50:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Traits/QueryTrait.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index c2542bb..7d48f95 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -911,9 +911,10 @@ trait QueryTrait */ private function sprintf($column, $value, string $opera = '='): string { - if (is_string($value)) { - $value = trim($value, '\'"'); + if (is_numeric($value)) { + return "$column $opera $value"; } + $value = trim($value, '\'"'); return "$column $opera '$value'"; }