Welcome Guest, Not a member yet? Register   Sign In
[solved] How to detect database connection error?
#1

[eluser]Treeda[/eluser]
Hi there,

simple thing, just modify your password in database config
set debug to false (well on a production site i never ever want user to see errors, sepcial not SQL related errors, so dbdebug has to be false) and call

$this->load->database();

you don't get any error, except you start to do queries .-/

It's not returning anything and it's not firing an exception.

So just to make a site bulletproof and give the user a nice and nifty error message if the database goes down or whatever, how can i detect that?

I aprpeciate any help
Treeda


Messages In This Thread
[solved] How to detect database connection error? - by El Forum - 07-10-2011, 04:44 PM
[solved] How to detect database connection error? - by El Forum - 07-10-2011, 04:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB