I want to update a table field with a new value provided like
if the field current value is 100 once updated with value 200, it should be 100,200
so i tried
$this->db->set('return', 'CONCAT(return,',','.$loan_number.')', FALSE);
$this->db->where( 'id', $this->input->post('id') );
$this->db->update('tbl_test');
i think im using CONCAT in wrong way though.
any idea how to get this work?
Regards
You have a problem with you quotes. This code gives four parameters to
$this->db->set():return,CONCAT(return,,,'{loan_number}andFALSE. Your trying to append,{loan_number}to return right? If so then you should either escape you quotes ore use different quotes.Escaping:
Different qutes: