note 113544 added to mongocollection.find
| From: | artusdebenque at yahoo dot fr | Date: | Mon, 28 Oct 2013 13:17:05 +0000 |
| Subject: | note 113544 added to mongocollection.find | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-197337@lists.php.net to get a copy of this message | ||
For the fields parameter, the documentaion says: "The _id field is always returned".
Knowing that mongodb allows you to uncheck the _id field ("the _id field is the only field that
you can explicitly exclude"; source: http://docs.mongodb.org/manual/reference/method/db.collection.find/#db.collection.find),
I tried it with php and it works : you can exclude the _id field.
Example : the following fields parameter will exclude the field "_id"
$fields = array('timestamp' => true, 'rank' => true, '_id' =>
false);
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/mongocollection.find.php
Edit -- https://master.php.net/note/edit/113544
Del: integrated -- https://master.php.net/note/delete/113544/integrated
Del: useless -- https://master.php.net/note/delete/113544/useless
Del: bad code -- https://master.php.net/note/delete/113544/bad+code
Del: spam -- https://master.php.net/note/delete/113544/spam
Del: non-english -- https://master.php.net/note/delete/113544/non-english
Del: in docs -- https://master.php.net/note/delete/113544/in+docs
Del: other reasons-- https://master.php.net/note/delete/113544
Reject -- https://master.php.net/note/reject/113544
Search -- https://master.php.net/manage/user-notes.php