![]() |
How to load database as run time? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to load database as run time? (/showthread.php?tid=16997) |
How to load database as run time? - El Forum - 03-23-2009 [eluser]Amit Patel[/eluser] Hello All How can i configure database information runtime means i have to change the database at run time the db info coming from database so how can i switch database at run time. can i use something this way Code: config['hostname']= **** I don't know how to use it plz help me How to load database as run time? - El Forum - 04-04-2009 [eluser]Mike Ryan[/eluser] Hi Amit, I don't fully understand your question, but I'm pretty sure you need to read this: http://ellislab.com/codeigniter/user-guide/database/connecting.html, which describes how to choose from a number of different "option groups" at runtime. If you want more flexibility than this you will probably need to extend the core DB code. How to load database as run time? - El Forum - 04-04-2009 [eluser]Amit Patel[/eluser] Thanks for your reply, Actually i want to switch database runtime. so if i defined the db group in database.php then it work's fine.But when i connect it to manually as define above it is not connecting. |