eee
This commit is contained in:
+8
-7
@@ -281,10 +281,11 @@ class SqlBuilder extends Component
|
||||
*/
|
||||
private function make(): string
|
||||
{
|
||||
$select = $this->makeCondition();
|
||||
$select .= $this->makeGroup();
|
||||
$select .= $this->makeOrder();
|
||||
return $select;
|
||||
return join(' ', [
|
||||
$this->makeCondition(),
|
||||
$this->makeGroup(),
|
||||
$this->makeOrder(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -310,7 +311,7 @@ class SqlBuilder extends Component
|
||||
private function makeGroup(): string
|
||||
{
|
||||
if ($this->query->group !== '' && $this->query->group !== '0') {
|
||||
return ' GROUP BY ' . $this->query->group;
|
||||
return 'GROUP BY ' . $this->query->group;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -322,7 +323,7 @@ class SqlBuilder extends Component
|
||||
private function makeOrder(): string
|
||||
{
|
||||
if (count($this->query->order) > 0) {
|
||||
return ' ORDER BY ' . implode(',', $this->query->order);
|
||||
return 'ORDER BY ' . implode(',', $this->query->order);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -337,7 +338,7 @@ class SqlBuilder extends Component
|
||||
if (empty($condition)) {
|
||||
return '';
|
||||
}
|
||||
return ' WHERE ' . $condition;
|
||||
return 'WHERE ' . $condition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user