note 99522 added to mongo.updates
| From: | RemiWoler at osu1 dot php dot net | Date: | Sat, 21 Aug 2010 16:38:38 +0000 |
| Subject: | note 99522 added to mongo.updates | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171915@lists.php.net to get a copy of this message | ||
If you queried for a record before, updating that same record is not so difficult. Just remember the
_id (of type MongoId) and use:
<?php
$blog->update(
array('_id'=> $id), //$id is the stored _id, and of type MongoId
array('$set' => array('comments.$.author' => "Jim"))
);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 80.101.132.47
----
Manual Page -- http://www.php.net/manual/en/mongo.updates.php
Edit -- https://master.php.net/note/edit/99522
Del: integrated -- https://master.php.net/note/delete/99522/integrated
Del: useless -- https://master.php.net/note/delete/99522/useless
Del: bad code -- https://master.php.net/note/delete/99522/bad+code
Del: spam -- https://master.php.net/note/delete/99522/spam
Del: non-english -- https://master.php.net/note/delete/99522/non-english
Del: in docs -- https://master.php.net/note/delete/99522/in+docs
Del: other reasons-- https://master.php.net/note/delete/99522
Reject -- https://master.php.net/note/reject/99522
Search -- https://master.php.net/manage/user-notes.php