From a844b86dc8045b562f6afb9ee7ab093c983a5137 Mon Sep 17 00:00:00 2001 From: Anders Andersson Date: Mon, 11 Nov 2013 11:19:23 +0100 Subject: [PATCH] Added whereBetweenOrEqualTo to parseQuery --- parseQuery.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/parseQuery.php b/parseQuery.php index cf4cda7..16be104 100644 --- a/parseQuery.php +++ b/parseQuery.php @@ -197,6 +197,18 @@ public function whereLessThanOrEqualTo($key,$value){ } + public function whereBetweenOrEqualTo($key, $startValue, $endValue){ + if(isset($key) && isset($startValue) && isset($endValue)){ + $this->_query[$key] = array( + '$gte' => $startValue, + '$lte' => $endValue + ); + } + else{ + $this->throwError('the $key, $startValue and $endValue parameters must be set when setting a "where" query method'); + } + } + public function whereAll($key,$value){ if(isset($key) && isset($value)){ if(is_array($value)){