using mongodb driver i try to update in database referring _id field.
my code
function update_attributes($id, $data){
$this->db_model->where('_id', $id);
$this->db_model->updates = array('$set' => array($data));
$query = $this->db_model->update('dff');
return $query;
}
$data
$form_data = array(
'name' => set_value('name'),
'description' => set_value('description')
);
$dfff = Dfff::update_attributes($this->input->post('id', TRUE), $form_data);
but it does not update the database. i get the error as
Update of data into MongoDB failed: localhost:27017: Invalid modifier specified: $set
where is the problem ?? using mongodb driver-alexbilbie