Skip to content

Commit

Permalink
Fixed: #96
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Jul 1, 2013
1 parent 2b728ce commit 5379fd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion EMongoCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ public function compare($column, $value = null, $partialMatch = false) {
if ($value===null)
return $this;
$query = array();
if (preg_match('/^(?:\s*(<>|<=|>=|<|>|=))?(.*)$/', $value, $matches)) {
if(is_array($value)||is_object($value)){
$query[$column]=array('$in'=>$value);
}elseif(preg_match('/^(?:\s*(<>|<=|>=|<|>|=))?(.*)$/', $value, $matches)) {
$value = $matches[2];
$op = $matches[1];
if ($partialMatch===true)
Expand Down

0 comments on commit 5379fd1

Please sign in to comment.