Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Multiple databse connection
#1

[eluser]Ivar89[/eluser]
Hi,

Is it possible to make connection to two different databases simultaneously?
and how would that go?

Code:
$active_group = "default";
$active_group2 = "second"; //???
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "****";
$db['default']['database'] = "lol";
$db['default']['dbdriver'] = "";
$db['second']['hostname'] = "localhost";
$db['second']['hostname'] = "localhost";
$db['second']['username'] = "root";
$db['second']['password'] = "****";
$db['second']['database'] = "boom";
$db['second']['dbdriver'] = "";

I knowI can test it but its an exam question so not enough time haha

thanks in advance
#2

[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-gui...cting.html

"Connecting to Multiple Databases"
#3

[eluser]Ivar89[/eluser]
Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB