Hello all,
I have written a simple php update command in php to update a mongo collection, I have followed example guides and the documentation, however for some reason my code will not update the collection in question.
Additionally, there are no errors, so I am at a bit of a loss with this one:
Code:
$find = array('_id' => new MongoId($_id));
$update = array('$set' => array('admin' => 'false'));
$db->user->update($find, $update);
Example collection
Code:
{
"_id" : ObjectId("57ad95301816a3bd078b4567"),
"admin" : "false",
"created_dstamp" : "2016-08-12 19:21:52",
"email" : "yo@yo.yo",
"last_login" : null,
"password" : "7f49e93c9cae6b0d40e3c2f1154fe6",
"salt" : "804551d0fa708e93cf1163d",
}