Welcome Guest, Not a member yet? Register   Sign In
More detailed database error reporting/logging?
#1

[eluser]billdami[/eluser]
Hey guys,

Can anyone tell me if there is a way to modify CI's database query error reporting and logging so that it logs more than just the basic error message ("You have an error in your syntax near..."), specifically I want it to include the entire SQL statement that was executed, the file that contains the query and what line it is on in that file.

Thanks in advance!
#2

[eluser]billdami[/eluser]
Anyone have any suggestions on this?
#3

[eluser]maria clara[/eluser]
this is an example in my database/mysql/mysql_driver.php for the mysql_error message:

Code:
/**
     * The error message string
     *
     * @access    private
     * @return    string
     */
    function _error_message()
    {
        return mysql_error($this->conn_id); //conn_id is a function in my session
    }
//--------------------------------------------------------------------------
     /**
     * The error message number
     *
     * @access    private
     * @return    integer
     */
    function _error_number()
    {
        return mysql_errno($this->conn_id);
    }



hope this can help you.




Theme © iAndrew 2016 - Forum software by © MyBB