![]() |
Force database transaction to rollback. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Force database transaction to rollback. (/showthread.php?tid=52809) |
Force database transaction to rollback. - El Forum - 06-27-2012 [eluser]Fábio[/eluser] Hi, How do I force a transaction to rollback, using the automatic method. ( The manual method supports nested transactions in MySQL? As far as I know it does not support. ) Code: try Thanks for your attention. Force database transaction to rollback. - El Forum - 06-27-2012 [eluser]CroNiX[/eluser] Haven't tried it, but I believe you would just have one trans_start. Any queries run after that would be part of the same transaction, wouldn't they? And then one trans_complete() after both queries. Then if you rollback it should roll both queries? From the transactions userguide: Code: $this->db->trans_start(); |