Two Databases - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Two Databases (/showthread.php?tid=5927) |
Two Databases - El Forum - 02-08-2008 [eluser]gdboling[/eluser] I searched a bit but didn't find anything. Maybe I used the wrong search string. Anyway, I have phpbb set up and I am writing an app to sit along side the forums for a site. I want to utilize member info from the forum memberships but I don't want to store my app data in the same database. Is there a way to manager 2 seperate db connections in code igniter? Thanks. Two Databases - El Forum - 02-08-2008 [eluser]gdboling[/eluser] Ok, I looked at the docs again and I may have just figured it out. I should be able to use $active_group to specify which db I need. So in my login controller I can specify something like: $active_group='phpbb_db'; And then in controllers that deal with my own db I can set it to that? Two Databases - El Forum - 02-08-2008 [eluser]gdboling[/eluser] And I just found the *real* answer: http://ellislab.com/codeigniter/user-guide/database/connecting.html |