Handle Dynamic Database Loading |
Basically I am trying to convert my old control system, which is just plain PHP not MVC, to Code Igniter 3. The issue I am having is with how to properly load in databases, from a database. Basically what I have built currently, is a system that handles several servers through one system by loading the database server information from the database of the current system. An example of what I am talking about is below:
How my old system works: PHP Code: $getgrid = $qls->SQL->query("SELECT * FROM grids WHERE id = '$gridid' AND gridowner = '$userid'"); I am trying to figure out a way to do that cleanly with Code Igniter MVC, because the old way like in that is not via MVC. I hope this makes since...
Once you retrieve the credentials, you can manually load and return a new database object.
http://www.codeigniter.com/user_guide/da...a-database http://www.codeigniter.com/user_guide/da...-databases |
Welcome Guest, Not a member yet? Register Sign In |