Skip to content

Commit

Permalink
Merge pull request #1 from tophitter/feature/fix_col_select_fields
Browse files Browse the repository at this point in the history
Fix issue with select all fields from table with sql_builder due to t…
  • Loading branch information
tophitter authored Sep 21, 2023
2 parents ec02ea3 + 2ae7050 commit 81c9391
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Database Helper",
"minimum-stability": "stable",
"license": "MIT",
"version": "1.0.10",
"version": "1.0.11",
"authors": [
{
"name": "jason",
Expand Down
6 changes: 5 additions & 1 deletion src/Database/Builder/SQL_Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ public function Output(){
}
$data[] = str_replace(array('{ARG}', '{FIELD}'), array($val, $field), SQL_FUNCTION::$func());
}else {
$data[] = !empty($this->getTablesAlias()) ? trim($this->getTablesAlias()) . '.`' . trim($this->getName()).'`' : '`'.trim($this->getName()).'`';
$field_name = trim($this->getName());
if($field_name != "*"){
$field_name = "`{$field_name}`";
}
$data[] = !empty($this->getTablesAlias()) ? trim($this->getTablesAlias()) . '.' . $field_name : $field_name;
}

if(!empty($this->getNameAlias())) {
Expand Down

0 comments on commit 81c9391

Please sign in to comment.