So what i have is table node with column operatingsystem_id and want that to be replicated to to columns os2_id and os3_id.
This is what I've done so far. but still os2_id and os3_id are empty. What am i doing wrong?
$crud->callback_after_insert(array($this, '_callback_updateos'));
$crud->callback_after_update(array($this, '_callback_updateos'));
function _callback_updateos($postarray, $id)
{
$data = array(
'os2_id' => $postarray->operatingsystem_id,
'os3_id' => $postarray->operatingsystem_id
);
$this->db->update('node', $data, array('node_id' => $id));
return true;
}