note 115621 added to class.mongoupdatebatch
| From: | jujhar at jujhar dot com | Date: | Wed, 27 Aug 2014 11:10:06 +0000 |
| Subject: | note 115621 added to class.mongoupdatebatch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200321@lists.php.net to get a copy of this message | ||
Here's a stackoverflow link showing you how to use this BulkUpdate feature properly and format
the updates you add to the class.
http://stackoverflow.com/questions/24753464/mongo-mass-update-to-lower-case
eg.
<?php
$batch->add(
array(
"q" => array( '_id' => $doc['_id'] ),
"u" => array(
'$set' => array(
'UserName' => strtolower($doc['UserName'])
)
)
)
);
?>
----
Server IP: 72.52.91.14
Probable Submitter: 195.224.31.66
----
Manual Page -- http://php.net/manual/en/class.mongoupdatebatch.php
Edit -- https://master.php.net/note/edit/115621
Del: integrated -- https://master.php.net/note/delete/115621/integrated
Del: useless -- https://master.php.net/note/delete/115621/useless
Del: bad code -- https://master.php.net/note/delete/115621/bad+code
Del: spam -- https://master.php.net/note/delete/115621/spam
Del: non-english -- https://master.php.net/note/delete/115621/non-english
Del: in docs -- https://master.php.net/note/delete/115621/in+docs
Del: other reasons-- https://master.php.net/note/delete/115621
Reject -- https://master.php.net/note/reject/115621
Search -- https://master.php.net/manage/user-notes.php