[eluser]sikko[/eluser]
You should avoid using $this->db->query() since codeigniter's db class has the functions to cover most of the queries.
Code:
class Brand extends CI_Model
{
//in the constructor
$this->table = 'brands';
public function save($brand)
{
$this->db->where('id', $brand->id);
return $this->db->update($this->table, $brand);
}
}
Fill your object in your controller, not in your model
Code:
$brand = new stdClass();
$brand->id = $id_to_update
$brand->title = $your_pdated_title;
$brand->desc.....
if($this->brand->save($brand))
//success
else
//fail
btw, this forum is not made for code, you should try to move your thread.