From 758c3226796eccedbf7e47314fd095d236434a2a Mon Sep 17 00:00:00 2001 From: whwyy Date: Thu, 1 Jan 2026 21:46:00 +0800 Subject: [PATCH] eee --- Traits/QueryTrait.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index 071c6cb..c186943 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -1068,7 +1068,11 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq private function sprintf(string $column, mixed $value, string $opera = '='): string { if (!is_numeric($value)) { - [$alias, $field] = explode('.', $value); + if (str_contains($column, '.')) { + [$alias, $field] = explode('.', $value); + } else { + $alias = ''; + } if (in_array($alias, $this->_alias)) { return $column . ' ' . $opera . ' ' . $value; }