@@ -25,8 +25,9 @@ discard block |
||
| 25 | 25 | {
|
| 26 | 26 | try {
|
| 27 | 27 | $query = "SELECT {$fields} FROM {$this->getTable()} ";
|
| 28 | - if (!empty($this->getTableAlias())) |
|
| 29 | - $query .= "AS {$this->getTableAlias()} ";
|
|
| 28 | + if (!empty($this->getTableAlias())) {
|
|
| 29 | + $query .= "AS {$this->getTableAlias()} ";
|
|
| 30 | + } |
|
| 30 | 31 | $this->add($query, $paramns); |
| 31 | 32 | return $this; |
| 32 | 33 | } catch (\PDOException $e) {
|
@@ -332,8 +333,9 @@ discard block |
||
| 332 | 333 | private function add(string $text, array $params = []) |
| 333 | 334 | {
|
| 334 | 335 | try {
|
| 335 | - if (!empty($params)) |
|
| 336 | - $this->params = array_merge($this->params, $params); |
|
| 336 | + if (!empty($params)) {
|
|
| 337 | + $this->params = array_merge($this->params, $params); |
|
| 338 | + } |
|
| 337 | 339 | $this->query .= $text; |
| 338 | 340 | } catch (\PDOException $e) {
|
| 339 | 341 | $this->setError($e); |