@@ -48,8 +48,9 @@ discard block |
||
| 48 | 48 | {
|
| 49 | 49 | try {
|
| 50 | 50 | $query = "SELECT {$fields} FROM {$this->getTableName()}";
|
| 51 | - if (!empty($this->getTableAlias())) |
|
| 52 | - $query .= " AS {$this->getTableAlias()}";
|
|
| 51 | + if (!empty($this->getTableAlias())) {
|
|
| 52 | + $query .= " AS {$this->getTableAlias()}";
|
|
| 53 | + } |
|
| 53 | 54 | $this->add($query, "main", $paramns); |
| 54 | 55 | return $this; |
| 55 | 56 | } catch (\PDOException $e) {
|
@@ -504,8 +505,9 @@ discard block |
||
| 504 | 505 | $this->sqlPartsSelect[$type] = $query; |
| 505 | 506 | } |
| 506 | 507 | |
| 507 | - if (!empty($params)) |
|
| 508 | - $this->setParams($params); |
|
| 508 | + if (!empty($params)) {
|
|
| 509 | + $this->setParams($params); |
|
| 510 | + } |
|
| 509 | 511 | } catch (\PDOException $e) {
|
| 510 | 512 | throw new DatabaseException( |
| 511 | 513 | "Add query part failed - TABLE: [{$this->getTableName()}] MESSAGE: [{$e->getMessage()}]",
|