protected function _update($id, array $data)
    {
        return $this->db->update($this->table, $data, ['id' => $id]);
    }
protected function _update($id, array $data)
    {
        return $this->db->update($this->table, $data, ['id' => $id]);
    }
protected function _update ( $ id , array $ data ) { return $ this -> db -> update ( $ this -> table , $ data , [ 'id' => $ id ] ) ; }
Updates item in table.

@param $id
@param array $data
@return bool|int
Updates item in table .