hi i need help with php and mongo db . i have docs in my server like this:
comment: "aaaaaa"
id: "11111"
_id: {$id: "564c5a297efcf0181d00002c"}
active: true
flag: 7
i need to give it a sting of ids
$ids = "5555,3333,2222,11111"
and i need to search in my docs for all the result with this ids i do it like this:
$query = array("id" => array('$in'=> $where));
its working ok but now i need to add anoter condition.
i need to find all the ids in my docs but the one that have also
"active" => true,
"comment.length" > 2
so the rusult query wil give me all the docs that has one of the ids && active = true && comment.length > 2 i manage to find a solution for the active and comment.length with this:
$jsCond = "function() {
return this.comment.length > 2 && this.active == true ;
}";
but and dont have any idea how to make it work good.
i need help!! thanks!