public function trans()
{
$this->db->trans_start(false);
$this->main_model->ID_MODULE = '9';
$this->main_model->NAME = 'T99';
$this->current_db->insert("TB_SYS_PROFILE", $this->main_model);
$this->main_model->NAMES = 'T99'; <= HERE I FORCE ERROR TO ROLLBACK....
IN CI2 ROLLBACK OCCURS, CI3 DONT WORK
$this->current_db->insert("TB_SYS_PROFILE", $this->main_model);
$this->current_db->trans_complete();
if($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
$ret=-2;
}
else {
$this->db->trans_commit();
$ret = 0;
}
}
Thanks for any help... I need keep with with CI2 :)