Welcome Guest, Not a member yet? Register   Sign In
Error Handling for Database Transactions
#1

[eluser]JGarrido[/eluser]
I'm attempting to do some error handling for failed database transactions, but I'm not getting any error returned from CI.$this->db->_error_number() and $this->db->_error_message() will give me what I'm looking for, but only if the insert I'm attempting to perform isn't wrapped in a transaction.

Is this a bug (or an omission, as I realize those 2 properties aren't even documented), or is there something I'm overlooking?
#2

[eluser]JGarrido[/eluser]
I also just noticed that when using the 'mysqli' driver, instead of the 'mysql', I also don't receive an error number or message back.
#3

[eluser]JGarrido[/eluser]
Does anyone else have the same experience? Does nobody else use transactions, or maybe a different method of database access altogether? I've had to fallback to direct PDO access for now, unless I can get this resolved.

Is it possible EE doesn't use database transactions, or mysqli?
#4

[eluser]webtigers[/eluser]
I'm dealing with the same problem.

If using transactions with MySQL 5.1/InnoDB/UTF-8 and a DB error occurs, all you get back is an internal server error.

How are you supposed to return error messages/codes from the DB using transactions?
#5

[eluser]JGarrido[/eluser]
This seems to be an overlooked, under-utilized area of the framework - which also happens to be critical to the application I'm working on Sad




Theme © iAndrew 2016 - Forum software by © MyBB