CI update_batch; Concatenate and increment variable and string as array value CI update_batch; Concatenate and increment variable and string as array value codeigniter codeigniter

CI update_batch; Concatenate and increment variable and string as array value


You can not do this via update_batch.

In the document https://ellislab.com/codeigniter/user-guide/database/active_record.html, its said like this:

Note: All values are escaped automatically producing safer queries.

how about just repeat db->set? e.g.

$this->db->where('name',$name1);for($var = 2004; $var<2008;$var++) {   $this->db->set($var.'x',$var.'x+1',FALSE);   $this->db->set($var.'y',$var.'y+1',FALSE);}$this->db->update('my_table');