Welcome Guest, Not a member yet? Register   Sign In
Database Error: Show Line Number
#9

[eluser]John_Betong[/eluser]
>>> The issue with that is I have to add that if statement to every single query I write.
>>> I want the CI database class to do this automatically on query error.

I have just unsuccessfully tried the database.php configuration but could not get it to work on my Localhost. Give it a try and see if it works on you computer.

// config/database.php
// ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.

I also tried PHP try/catch but that did not work.

I also tried setting the PHP error_level(0); and that did not work.

I would be tempted to test for the $query and act upon the result.
 
 
 


Messages In This Thread
Database Error: Show Line Number - by El Forum - 09-23-2010, 05:36 PM
Database Error: Show Line Number - by El Forum - 09-24-2010, 06:16 AM
Database Error: Show Line Number - by El Forum - 09-24-2010, 09:10 AM
Database Error: Show Line Number - by El Forum - 09-26-2010, 09:21 PM
Database Error: Show Line Number - by El Forum - 09-27-2010, 06:25 AM
Database Error: Show Line Number - by El Forum - 09-27-2010, 08:48 AM
Database Error: Show Line Number - by El Forum - 09-27-2010, 09:56 AM
Database Error: Show Line Number - by El Forum - 09-27-2010, 10:04 AM
Database Error: Show Line Number - by El Forum - 09-27-2010, 11:00 AM
Database Error: Show Line Number - by El Forum - 09-27-2010, 11:07 AM
Database Error: Show Line Number - by El Forum - 11-23-2010, 10:14 AM
Database Error: Show Line Number - by El Forum - 11-23-2010, 10:44 AM
Database Error: Show Line Number - by El Forum - 12-06-2012, 11:33 AM
Database Error: Show Line Number - by El Forum - 12-11-2012, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB