Welcome Guest, Not a member yet? Register   Sign In
logging mysql errors
#1

[eluser]coolgeek[/eluser]
I need to log MySQL errors for a production system. It seems that setting $db['default']['db_debug'] = FALSE not only prevents MySQL errors from being displayed in the browser, but it also prevents them from being logged.

Is there any way to configure logging without display?

Alternatively, is the connection handle available so that I can use mysqli_error()?

Note that I'm especially interested in logging errors from within transactions that operate across multiple models.

Thanks
#2

[eluser]WanWizard[/eluser]
You can get the connection id via
Code:
$this->db->conn_id

You can also access the the error and error message via
Code:
$this->db->_error_number();
$this->db->_error_message();
#3

[eluser]coolgeek[/eluser]
Much appreciated. And I now see that

Code:
$this->db->call_function();

is also an option




Theme © iAndrew 2016 - Forum software by © MyBB