![]() |
DB transaction error peculiarity - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: DB transaction error peculiarity (/showthread.php?tid=88612) |
DB transaction error peculiarity - codeus - 10-05-2023 Code: Configuration: The transaction fails, but there's no indication in $this->db->error(). All the mariaDB tables are INNODB tables. Code: $this->db->transStart(); And in the log, there are numerous examples from the logging code like this: Code: PHP message: transaction error: Added db->error() to report on each individual SQL statements, each report indicates code is 0. Is db-error() the wrong means to detect a transaction error, or is there actually an error? RE: DB transaction error peculiarity - InsiteFX - 10-05-2023 Did you try using try / catch with Exceptions? PHP Code: // When DBDebug in the Database Config must be true. RE: DB transaction error peculiarity - codeus - 10-07-2023 Using exceptions, it works ok. The only thing changed in the SQL was one of the queries was db->simpleQuery(), changed that to db->query(). Will see if it still causes problem reverting back to non-exception code. |