Skip to content

Commit

Permalink
Merge pull request #10 from maxmamis/develop
Browse files Browse the repository at this point in the history
Add sort parameter to mongo queries
  • Loading branch information
ppatriotis committed Sep 25, 2013
2 parents 0a1803a + 8adba92 commit 22bce21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MongoDataConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ function query($table, $query) {
if (!empty($query['limit'])) {
$return = $return->limit($query['limit']);
}
if (!empty($query['sort'])) {
$return = $return->sort($query['sort']);
}

$mongodata = array();
while ($return->hasNext()) {
Expand Down

0 comments on commit 22bce21

Please sign in to comment.