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)){