note 119651 added to mongocollection.update

From: Date: Tue, 26 Jul 2016 08:31:20 +0000
Subject: note 119651 added to mongocollection.update
Groups: php.notes 
Request: Send a blank email to php-notes+get-206102@lists.php.net to get a copy of this message
$inc and set in one statement <?php $m = new Mongo(); $db = $m->selectDB('db'); $collection = 'collection'; $db->$collection->insert(array("firstname" => "Nanhe", "lastname" => "Kumar","attempt"=>1 )); $newdata = array('$inc'=>array("attempt"=>1),'$set' => array("address" => "Delhi India")); $db->$collection->update(array("firstname" => "Nanhe"), $newdata); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 14.141.89.242 ---- Manual Page -- http://php.net/manual/en/mongocollection.update.php Edit -- https://master.php.net/note/edit/119651 Del: integrated -- https://master.php.net/note/delete/119651/integrated Del: useless -- https://master.php.net/note/delete/119651/useless Del: bad code -- https://master.php.net/note/delete/119651/bad+code Del: spam -- https://master.php.net/note/delete/119651/spam Del: non-english -- https://master.php.net/note/delete/119651/non-english Del: in docs -- https://master.php.net/note/delete/119651/in+docs Del: other reasons-- https://master.php.net/note/delete/119651 Reject -- https://master.php.net/note/reject/119651 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206102) next »