Welcome Guest, Not a member yet? Register   Sign In
Using Hooks to select Database
#1

[eluser]faceh[/eluser]
I am creating a code base where many different domain names will point to the same codeigniter installation, each having their own SQL database.

I want to use Hooks (or any other appropriate method) to select which SQL Database to use. My first thought is to use a pre_controller hook to grab the domain name using $_SERVER[http_host], and then use this to determine which client it is. The problem is passing this information from the hook to the database file, as the db file only uses local variables.

Any thoughts?


Messages In This Thread
Using Hooks to select Database - by El Forum - 01-28-2008, 11:04 AM
Using Hooks to select Database - by El Forum - 01-28-2008, 11:11 AM
Using Hooks to select Database - by El Forum - 01-28-2008, 11:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB