note 100202 added to mongocollection.findone
| From: | dominik at dokdok dot com | Date: | Thu, 30 Sep 2010 18:44:04 +0000 |
| Subject: | note 100202 added to mongocollection.findone | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172855@lists.php.net to get a copy of this message | ||
There is also a notation to retrieve all fields, but the specified ones
<?php
$users = $mongo->my_db->users;
$user = $users->findOne(array('username' => 'jwage'),
array('password' => 0));
print_r($user);
?>
Will return all fields of the user, but the password field.
----
Server IP: 216.235.13.26
Probable Submitter: 173.177.97.106
----
Manual Page -- http://www.php.net/manual/en/mongocollection.findone.php
Edit -- https://master.php.net/note/edit/100202
Del: integrated -- https://master.php.net/note/delete/100202/integrated
Del: useless -- https://master.php.net/note/delete/100202/useless
Del: bad code -- https://master.php.net/note/delete/100202/bad+code
Del: spam -- https://master.php.net/note/delete/100202/spam
Del: non-english -- https://master.php.net/note/delete/100202/non-english
Del: in docs -- https://master.php.net/note/delete/100202/in+docs
Del: other reasons-- https://master.php.net/note/delete/100202
Reject -- https://master.php.net/note/reject/100202
Search -- https://master.php.net/manage/user-notes.php