[eluser]gRoberts[/eluser]
It must be my setup as I have just uploaded a fresh copy of 1.7.2 downloaded today from CI and put the following code in (only changed the config/database files and added a controller)
Code:
$this->load->database();
//create
$cls = new stdClass();
$cls->Key = 'class';
$cls->SafeColumn = 'test';
$this->db->insert('test', $cls);
$cls->RowID = $this->db->insert_id();
$arr = array();
$arr['Key'] = 'array';
$arr['SafeColumn'] = 'test';
$this->db->insert('test', $arr);
$arr['RowID'] = $this->db->insert_id();
$cls->SafeColumn = 'changed';
$this->db->update('test', $cls, array('RowID' => $cls->RowID));
$arr['SafeColumn'] = 'changed';
$this->db->update('test', $arr, array('RowID' => $arr['RowID']));
it worked :|
Thanks again