CodeIgniter Forums
How to connect to a different database than the one set in config? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to connect to a different database than the one set in config? (/thread-47688.html)



How to connect to a different database than the one set in config? - El Forum - 12-18-2011

[eluser]Emkay[/eluser]
I need to retrieve some data from a different database, perhaps on the same or different server on a particular page, how can I go about doing this? Ideally, I would like to remain connected to the main database is well.

Sorry if this is an obvious or dumb question.