Welcome Guest, Not a member yet? Register   Sign In
Query Helper append to existing field.
#1

(This post was last modified: 10-01-2020, 07:34 AM by imabot.)

Hi! With CodeIgniter 3, I would like to append a string to an existing field. I did something like :

PHP Code:
$this->db->where('id'$id);
$this->db->set('field'"CONCAT(field, '" $string."')"false);
$this->db->update('mytable'); 

I don't really like "not escaping" the user input. What is the right and secure way to append a string to an existing field ?
Reply


Messages In This Thread
Query Helper append to existing field. - by imabot - 10-01-2020, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB