// sql rollback
$this->db->trans_start();
// sql
$this->db->query();
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
} else {
$this->db->trans_commit();
}
Easy is power
// sql rollback
$this->db->trans_start();
// sql
$this->db->query();
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
} else {
$this->db->trans_commit();
}