I’m trying to fetch multiple users who have specific mongoids like the
select * from users where id in(1,2,3) (similiar to sql)
using mongodb php wrapper like this :
$criteria['_id'] = array('$in'=>array(new MongoId('4e0462f5506d3c0c19000003'),new MongoId('4e03608b506d3ca4130002c0'),new MongoId('4e03608b506d3ca4130002bf')));
return $this->mongo->db->users->find($criteria);
I’m getting a blank mongocursor object.
MongoCursor Object
(
)
Please help.I’m following example #3 from this page : http://www.php.net/manual/en/mongocollection.find.php
And?
A cursor does not represent the result set. A cursor is an iterable to get hold of the result items – one after the other – like in every other database system.
Perhaps you want to read the cited documentation a bit further and check the examples on the same page.