diff --git a/extdbms/lib/Core/Model.php b/extdbms/lib/Core/Model.php index f0b76eb..8be8a29 100644 --- a/extdbms/lib/Core/Model.php +++ b/extdbms/lib/Core/Model.php @@ -136,7 +136,8 @@ abstract class Model } // public function select(mixed $columns = "*"): void { - $this->_querys["SELECT"] = "SELECT " . is_array($columns) ? implode(",", $columns) : $columns . " FROM {$this->getTable()} WHERE {$this->getWhere()}"; + $columns = is_array($columns) ? implode(",", $columns) : $columns; + $this->_querys["SELECT"] = "SELECT {$columns} FROM {$this->getTable()} WHERE {$this->getWhere()}"; } final public function join(string $table, mixed $match = null, $type = ""): void {