I\'m using Codeigniter transactions
$this->db->trans_start();
$this->db->query(\'AN SQL QUERY...\');
$this->db->trans_complete();
>
What I tried was more of a trick, but it worked for me.
$this->db->trans_begin();
$rst1= $this->utils->insert_function($data);
$rst2 = $this->utils->update_function2($test);
if($this->db->trans_status() === FALSE || !isset($rst1) || !isset($rst2)){
$this->db->trans_rollback();
}else{
$this->db->trans_commit();
}