title: CodeIgniter: Multiple Databases - Accessing database config in a second database
body: <p>I've been looking into using multiple databases with CodeIgniter. If I know what the databases are ahead of time, then I can set the information in the config file and then call whichever database group I need. </p>
  
  <p>In my situation, however, I need to store that database information in another database. It is sort of a master database with general information about a customer including the database and credentials that the customer's data is stored in. This vendor can then add customers whenever they want and have each customer's data segregated in different databases. </p>
  
  <p>How can I set the database and credentials based on the values I get back from the master database in CodeIgniter, or is there even a way to do that? </p>
  
  <p>Can anyone point me in the right direction? Thanks in advance for any advice.</p>