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

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -