eee
This commit is contained in:
+4
-1
@@ -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 '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq
|
||||
public array $select = ['*'];
|
||||
public array $join = [];
|
||||
public array $order = [];
|
||||
public int $offset = 0;
|
||||
public int $limit = 0;
|
||||
public int $offset = -1;
|
||||
public int $limit = -1;
|
||||
public string $group = '';
|
||||
public string $from = '';
|
||||
public string $alias = 't1';
|
||||
|
||||
Reference in New Issue
Block a user