From 3a0f96ac89e1803b1c60a69dc627ebb7a3bde316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=AF=BAEno?= <895183594@qq.com> Date: Mon, 4 Nov 2024 11:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A2=E5=BC=95=E5=88=97=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Db/Query/Query.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Db/Query/Query.php b/src/Db/Query/Query.php index 4d8c1e92c..55c6ca60d 100644 --- a/src/Db/Query/Query.php +++ b/src/Db/Query/Query.php @@ -1293,6 +1293,12 @@ public function column($fields, ?string $key = null): array ->select(); $records = $result->getStatementRecords(); + + if (is_string($key) && strpos($key, '.')) + { + [, $key] = explode('.', $key); + } + if (1 === \count($rawFields)) { $column = $rawFields[0];