From 89f694955696e6be98def6ae58a32f7af537b86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 19 May 2025 11:19:20 +0800 Subject: [PATCH] eee --- SqlBuilder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SqlBuilder.php b/SqlBuilder.php index 188c6f2..3a9ba21 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -206,7 +206,8 @@ class SqlBuilder extends Component */ public function one(): string { - return $this->makeSelect($this->query->getSelect()) . $this->make() . $this->makeLimit($this->query->limit(1)); + $this->query->offset(0)->limit(1); + return $this->makeSelect($this->query->getSelect()) . $this->make() . $this->makeLimit(); } @@ -216,7 +217,7 @@ class SqlBuilder extends Component */ public function all(): string { - return $this->makeSelect($this->query->getSelect()) . $this->make() . $this->makeLimit($this->query); + return $this->makeSelect($this->query->getSelect()) . $this->make() . $this->makeLimit(); }