vesparny/cimongo-codeigniter-mongodb-library — Issue #7: Decrement not working?
Author: Foap
Created: 2012-02-23 20:15:32+00:00
State: open

Hello,

The decrement function says inc, shouldn´t it be dec?

Like this:

public function dec($fields = array(), $value = 0){
$this->_update_init('$dec');
if (is_string($fields)){
$this->updates['$dec'][$fields] = $value;
}elseif (is_array($fields)){
foreach ($fields as $field => $value){
$this->updates['$dec'][$field] = $value;
}
}
return $this;
}