I am using MongoDB GridFS to store some user avatars. My backend is PHP.
On some page I need to display all images with single user. So I have the Mongo IDs. How do I perform a find query where _id is in given IDs. In mongo the query would be {"_id: {$in: [id1,id2]}
.
In PHP I have:
$gridFs = $this->getGridFs();
$photos = $gridFs->find();
where find accepts 2 arrays. If I was finding single file it would be:
$photos = $gridFs->find(array('id' => new MongoId($id)));
So what about several results? And also I wander if it is possible to find with limit and offset?