Welcome Guest, Not a member yet? Register   Sign In
logging to a database
#3

[eluser]fatTireFreak[/eluser]
This has turned into a bit of a rabbit hole. I could just code a db connection and query info right into MY_Log.php, but then if we ever change the database someone would have to go in there and change it or the whole app would break. So, I wanted to put the database information in a custom config file. Then I load that config file in the autoloader. But, that config isn't available in MY_Log.php at the time I need it.

I could put the db info in the config.php file, but I'm trying to keep everything that's specific to our implementation in one place.

So, I'm back to where I started. I really want to use the CI DB class and not code the connection and queries in the conventional way. I'm wondering if there's a way to use a hook? Or any suggestions that might help?

Thanks


Messages In This Thread
logging to a database - by El Forum - 05-26-2010, 06:02 PM
logging to a database - by El Forum - 05-26-2010, 08:30 PM
logging to a database - by El Forum - 05-27-2010, 03:40 PM
logging to a database - by El Forum - 05-27-2010, 05:31 PM
logging to a database - by El Forum - 10-16-2010, 11:50 AM
logging to a database - by El Forum - 10-16-2010, 01:14 PM
logging to a database - by El Forum - 10-16-2010, 01:17 PM
logging to a database - by El Forum - 10-17-2010, 07:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB