Skip to content

Commit

Permalink
Release version 1.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
FaaPz committed Feb 27, 2016
1 parent 8dc5d55 commit 34fd4db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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.7
+ Updated `WhereClause` class with:
- Fixed some weird bug in `__toString()` method
+ Updated `HavingClause` class with:
- Fixed the same weird bug in`__toString()` method

> Mentioned by [EliaRigo](https://github.com/EliaRigo). Thanks!
##### v1.9.6
+ Updated `LimitClause` class with:
- Fixed `limit()` 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.6",
"version": "1.9.7",
"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(implode('', $args), 'AND ');
return ' HAVING '.ltrim(preg_replace('/AND/', '', implode('', $args)));
}
}
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(implode('', $args), 'AND ');
return ' WHERE '.ltrim(preg_replace('/AND/', '', implode('', $args)));
}
}

0 comments on commit 34fd4db

Please sign in to comment.