I am setting up a cronjob to update the field views_15
on all documents from collection query
.
This is what I had, that should have worked:
$update = array(
'$set' => array (
'views_15' => 0
)
);
$db->queries->update(array(), $update, array('multi' => true));
Also it works for a specific query!
So what should I use instead of array()
, from the < query > parameter to select all documents?