codeigniter - Updating field in Active Record -
i want write query like
"update table tbl_name set amount = amount + 100 id = 10";
i found no documentation in ci active record library, possible such query using acitve record?
looking forward responses.
this model function:
function update($id) { $this->db->set('amount', 'amount+100', false) $this->db->where('id ', $id); $this->db->update('tbl_name'); }
you can read ci active record here
Comments
Post a Comment