I want to write a query like:
"Update table tbl_name set amount = amount + 100 where id = 10";
Is it possible to do such query builder methods?
This is the 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 the CI Active Record here