Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.
Connecting to Multiple Databases
Hi. I'm working on a log in form that will connect to a separate database to check against the user's table (so I don't have to require users to sign up twice to interact with my fuelcms-run site).
I've managed to build the form and it works great. I've integrated the log in view into my fuelcms block header.
My question is, if the user fails the log in form, I want to display a regular fuel cms page with the log in error and let them try again.
I've connected to the second database from within my user_model. When i fail the log in, I get an error that the fuel_bocks table can't be found from within the wrong database (it's not there).
So what is the proper protocol for connecting to two databases using Fuel? The error I receive is on line 244 of MY_models.php, but I only want to connect to this secondary database to test the user's log in credentials (which is why I put the database info within my user_model). I set the new database using:
$this->secondDB = $this->load->database($dbInfo, TRUE);
and can make calls using $this->secondDB->query, etc. But I don't want to affect the regular $this->db->query calls.