Источник: http://codeigniter.com/user_guide/datab ... tions.html
Код: Выделить всё
$this->db->trans_begin();
$this->db->query('AN SQL QUERY...');
$this->db->query('ANOTHER QUERY...');
$this->db->query('AND YET ANOTHER QUERY...');
if ($this->db->trans_status() === FALSE){
$this->db->trans_rollback();
}
else{
$this->db->trans_commit();
}
Подробнее здесь: https://stackoverflow.com/questions/113 ... ansactions
Мобильная версия