Welcome Guest, Not a member yet? Register   Sign In
Best way to get just a tiny bit of data from another database
#5

[eluser]elvix[/eluser]
I think the way to go (least how I've got it working) for a one-time call to a second db is:

Set up second DB config array in database config file.

$config['newdb']['hostname'] ....

Set pconnect to FALSE

Create object for other DB: $NEWDB = $this->load->database('newdb');

Now you can grab something from your other DB and CI will go back to your primary DB when you're done.

See manual: database config, connecting to multiple databases for more info.


Messages In This Thread
Best way to get just a tiny bit of data from another database - by El Forum - 07-15-2008, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB