I am working on a database column value (int) to subtract and update using set
.
I am using $this->db->set()
to subtract and update column value in codeigniter.
The problem is when I run the query the column value get change to null.
- $this->db->set('app_balance', 'app_balance'. - $app_work_charge.'');
- $this->db->where('id', $app_id);
- $this->db->update('app');
In my log file it will not showing any error.
More Explanation: if column value is 200 and if I will want to subtract 10 from it then after query execution it will change to null
.