Using the PHP driver, I am trying to access a document by it's _id and
I can't get a result back. I am passing to it an array as such:
$mid = new MongoId("4b80c94a8ead0eaf12040000");
$col->findOne(array('_id' =>$mid));
It works fine if I query against any other field that is not a
MongoId.
Could anyone help please?
Thank you
I'm a fan of doing var_dump on all the output if you're not getting back what you expected. Check that the $mid is actually returning object(MongoId) and $output = $col->findOne(array('_id' => $mid)) is returning an array.
Hope that helps.
-Fitz
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>