Open bunglegrind opened 1 year ago
https://codeigniter.com/userguide3/database/transactions.html?highlight=transactions#running-transactions-manually
$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(); }
Well, trans_commit can fail (and it does!). The return value (which is actually a boolean) must be checked to ensure the correcteness of the transaction. Same applies to trans_complete
https://codeigniter.com/userguide3/database/transactions.html?highlight=transactions#running-transactions-manually
Well, trans_commit can fail (and it does!). The return value (which is actually a boolean) must be checked to ensure the correcteness of the transaction. Same applies to trans_complete