note 108287 added to mongocollection.findone
| From: | fred dot trotter at gmail dot com | Date: | Sat, 14 Apr 2012 05:35:58 +0000 |
| Subject: | note 108287 added to mongocollection.findone | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187122@lists.php.net to get a copy of this message | ||
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
----
Server IP: 69.147.83.197
Probable Submitter: 98.194.207.41
----
Manual Page -- http://www.php.net/manual/en/mongocollection.findone.php
Edit -- https://master.php.net/note/edit/108287
Del: integrated -- https://master.php.net/note/delete/108287/integrated
Del: useless -- https://master.php.net/note/delete/108287/useless
Del: bad code -- https://master.php.net/note/delete/108287/bad+code
Del: spam -- https://master.php.net/note/delete/108287/spam
Del: non-english -- https://master.php.net/note/delete/108287/non-english
Del: in docs -- https://master.php.net/note/delete/108287/in+docs
Del: other reasons-- https://master.php.net/note/delete/108287
Reject -- https://master.php.net/note/reject/108287
Search -- https://master.php.net/manage/user-notes.php