CodeIgniter Forums

Full Version: How to catch a database config issue?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there

I'm using CI 2.0.2 but I want to be able to catch an error.

I've been using a second database config, but I really want to be able to check from within the code IF the second database connection is installed in the database.php config file. Whats the best way of doing this?

I'm at a bit of a loss at present, and I'm almost thinking of storing the second DB config in a separate config file and then just checking if that file exists.

Any help appreciated.