Welcome Guest, Not a member yet? Register   Sign In
Append value to database field
#1

[eluser]mvdg27[/eluser]
Hi,

I'm not sure if this is directly CI related, or has to do more with SQL queries in general .. anyway, I'm trying to append a value to a certain field, like so:
Code:
$where = 'id IN ('.$data['related'].')';                
$this->db->where($where);
$this->db->set('related', 'related,'.$this->db->insert_id());
$this->db->update('artists');

The correct rows are updated, but instead of appending, the current value get's overwritten with the string 'related'. Which makes sense, but I have no clue how to do this any other way ..

Anyone have an idea?

Thanks!


Messages In This Thread
Append value to database field - by El Forum - 02-08-2008, 03:34 AM
Append value to database field - by El Forum - 02-08-2008, 06:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB