This commit is contained in:
2023-12-13 16:19:16 +08:00
parent 658445927a
commit c84d9f8328
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -317,7 +317,10 @@ class SqlBuilder extends Component
private function makeLimit(): string
{
return ' LIMIT ' . $this->query->offset . ',' . $this->query->limit;
if ($this->query->offset >= 0 && $this->query->limit >= 1) {
return ' LIMIT ' . $this->query->offset . ',' . $this->query->limit;
}
return '';
}