Skip to content

Commit

Permalink
Release version 1.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
FaaPz committed Feb 27, 2016
1 parent 34fd4db commit 5f766ca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
### Changelog

##### v1.9.8
+ Updated `SelectStatement` class with:
- Fixed `getColumns()` method
+ Updated `WhereClause` class with:
- Reverted `__toString()` method
+ Updated `HavingClause` class with:
- Reverted `__toString()` method

##### v1.9.7
+ Updated `WhereClause` class with:
- Fixed some weird bug in `__toString()` method
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slim/pdo",
"description": "PDO database library for Slim Framework",
"version": "1.9.7",
"version": "1.9.8",
"type": "library",
"keywords": ["pdo", "database", "slim", "framework"],
"homepage": "https://github.com/FaaPz/Slim-PDO",
Expand Down
2 changes: 1 addition & 1 deletion src/PDO/Clause/HavingClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ public function __toString()
$args[] = $having;
}

return ' HAVING '.ltrim(preg_replace('/AND/', '', implode('', $args)));
return ' HAVING '.ltrim(implode('', $args), ' AND');
}
}
2 changes: 1 addition & 1 deletion src/PDO/Clause/WhereClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,6 @@ public function __toString()
$args[] = $where;
}

return ' WHERE '.ltrim(preg_replace('/AND/', '', implode('', $args)));
return ' WHERE '.ltrim(implode('', $args), ' AND');
}
}
4 changes: 0 additions & 4 deletions src/PDO/Statement/SelectStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,6 @@ protected function getSelect()
*/
protected function getColumns()
{
if ($this->aggregate) {
array_splice($this->columns, 0, -1);
}

return implode(' , ', $this->columns);
}

Expand Down

0 comments on commit 5f766ca

Please sign in to comment.