Using multiple databases with the database sessions class - 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: Using multiple databases with the database sessions class (/showthread.php?tid=45599) |
Using multiple databases with the database sessions class - El Forum - 09-27-2011 [eluser]AeroCross[/eluser] I'm using a custom-made model that connects to an external Wordpress database. Everything's working flawlessly, except when I activate the Database Sessions. When I do, in the controller where I both use the WP model and the Database Sessions, I get an error indicating that the selected database doesn't have the requested table. The (incorrectly) selected database is the one I set up in the database.php config file. I tried doing what the User Guide indicates: Code: $db1 = $this->load->database('wp', TRUE); // wordpress database as defined in database.php And adding $db1 or $db2 to my models - no luck, the model still throws an error. Any reccomendations on how to use these two features altogheter? |