Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->db->trans_begin();
- $q1 = $this->db->query("INSERT INTO `test`(`test_col`) VALUES ('aaaaaa')");
- sleep(100000);
- $q2 = $this->db->query("INSERT INTO `test`(`test_col`) VALUES ('bbbbbb')");
- $this->db->trans_complete();
- $this->db->trans_begin();
- $q1 = $this->db->query("INSERT INTO `test`(`test_col`) VALUES ('duplicated')");
- $q2 = $this->db->query("INSERT INTO `test`(`test_col`) VALUES ('new row')");
- $this->db->trans_complete();
- if ($this->db->trans_status() === FALSE) {
- // I get this line, but trans_rollback doesn't work
- $this->db->trans_rollback();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement