Welcome Guest, Not a member yet? Register   Sign In
Changing database based on login parameter
#3

(This post was last modified: 06-17-2015, 04:08 PM by dutchlab.)

(06-17-2015, 03:58 PM)CroNiX Wrote: Yeah that won't work in a config file, which gets loaded early on in the bootstrap process before CI has finished instantiating all classes used for the request.

Whats the purpose in changing the db name depending on the logged in user? Does each user have their own db or something?

Yes each company will have there own database. I have a user database that will allow all users to log in and then based on their log in the database name will change.

I could put the database name in the session variable if there is a way to retrieve that value when reading the database.php.
Reply


Messages In This Thread
RE: Changing database based on login parameter - by dutchlab - 06-17-2015, 04:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB