note 108287 deleted from mongocollection.findone by bjori

From: Date: Sun, 02 Sep 2012 12:27:36 +0000
Subject: note 108287 deleted from mongocollection.findone by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-190419@lists.php.net to get a copy of this message
Note Submitter: fred dot trotter at gmail dot com ---- For whatever reason the @ symbol throws the php implementation of findOne for a loop. I think this is the same problem that ejs5 was experiencing but if you are trying to do a findOne on an email address like $an_array = $col->findOne('email' => 'fred.trotter@example.com'); You will get nothing. But if you do: $an_cursor = $col->find('email' => 'fred.trotter@example.com'); $an_array = $an_cursor->getNext(); you will have the same result. Interestingly I was not able to replicate this problem with the '&' symbol that ejs5 complained about. Perhaps this is a bug being chased down across versions. Hope this helps someone. -FT

« previous php.notes (#190419) next »