Under Codeigniter, is it possible to see mysql_error()? Under Codeigniter, is it possible to see mysql_error()? codeigniter codeigniter

Under Codeigniter, is it possible to see mysql_error()?


Yes, this is the mysql_error() wrapper.

$this->db->_error_message();

And the mysql_errno wrapper is:

$this->db->_error_number();


You may be able to use call_function in the db class to access mysql_error:

http://ellislab.com/codeigniter/user-guide/database/call_function.html

Of course, you could also just turn on the debug flag in the DB config, to tell CI to display db errors:

http://ellislab.com/codeigniter/user-guide/database/configuration.html

db_debug - TRUE/FALSE (boolean) - Whether database errors should be displayed.