CodeIgniter Forums
How to display mysql errors in CI? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to display mysql errors in CI? (/showthread.php?tid=16996)



How to display mysql errors in CI? - El Forum - 03-23-2009

[eluser]Computerzworld[/eluser]
Hello,
I am using CI database class for running queries. How can I display appropriate mysql errors exactly like
Code:
die(mysql_error())
is doing? Is there any way to check it using CI? Please help me. Thanks in advance.


How to display mysql errors in CI? - El Forum - 03-23-2009

[eluser]pistolPete[/eluser]
Enable db_debug:
Code:
$db['default']['db_debug'] = TRUE;
User guide


How to display mysql errors in CI? - El Forum - 03-23-2009

[eluser]Computerzworld[/eluser]
thanks for the reply... it worked!!!!