Problem related to PHP/MongoDB:
I am updating my MongoDB database using the data coming from a PHP script and it can have variable number of elements to be updated into MongoDB. For testing purpose, I tried..
$update = '"continent"=>"Asia"'; // one element to be updated
$tracking->sessions->update(array("ts"=>$timestamp,"fb_id"=>$fb_id),array($update));
I do not get any error when I do this, however the data is not updated in the database, instead a new record is created:
{ "_id" : ObjectId("517048f87a088a7e65000003"), "0" : "'continent'=>'Asia'" }