src/MVC/CDatabaseModel.php
public function update($values = []){
    if(key_exists('id', $values)){
      $this->id = $values['id'];
      unset($values['id']);
    }
      
    $keys   = array_keys($values);
    $values = array_values($values);
    
    // Its update, remove id and use where-clause
    $values[] = $this->id;
    
    $this->db->update(
      $this->getSource(),
      $keys,
      "id = ?"
    );
    
    return $this->db->execute($values);
  }
public function update($values = []){
    if(key_exists('id', $values)){
      $this->id = $values['id'];
      unset($values['id']);
    }
      
    $keys   = array_keys($values);
    $values = array_values($values);
    
    // Its update, remove id and use where-clause
    $values[] = $this->id;
    
    $this->db->update(
      $this->getSource(),
      $keys,
      "id = ?"
    );
    
    return $this->db->execute($values);
  }
Update row

@Param   Array     $values     Key/values to save
@Return  Boolean   True/false  If saving went okey