This commit is contained in:
2025-02-17 16:26:32 +08:00
parent 7fb9c3ea05
commit 0f0a3349fb
+6 -2
View File
@@ -1,4 +1,5 @@
<?php /** @noinspection ALL */ <?php
/** @noinspection ALL */
declare(strict_types=1); declare(strict_types=1);
@@ -189,7 +190,10 @@ class SqlBuilder extends Component
if (is_null($value)) { if (is_null($value)) {
return $keys; return $keys;
} }
if (preg_match('/^[+|-]\s\d+$/', $value)) { if (is_numeric($key)) {
$this->query->pushParam($value);
$keys[] = $key . '= ?';
} else if (preg_match('/^[+|-]\s\d+$/', $value)) {
$keys[] = $key . '=' . $key . ' ' . $value; $keys[] = $key . '=' . $key . ' ' . $value;
} else { } else {
$this->query->pushParam($value); $this->query->pushParam($value);