Welcome Guest, Not a member yet? Register   Sign In
Using two databases
#2

[eluser]rogierb[/eluser]
I'm confused, the second database is 'B' but in your example you load 'A' as the second database.
This would mean you have connected to 'A' twice.

On of our apps uses multi database. The key is to test all of your connection data and test if the server your code resides on, has access to that database.

Once you are satisfied all the connections work flawlessly, then build your second or third or whatever connection.
You won't have any problems, the way you connect to A
Code:
$this->a = $this->load->database('A',TRUE);
$result_set = $this->a->query($query);

Is the correct way to connect to another database


Messages In This Thread
Using two databases - by El Forum - 10-22-2009, 07:07 AM
Using two databases - by El Forum - 10-22-2009, 07:24 AM
Using two databases - by El Forum - 10-22-2009, 09:03 AM
Using two databases - by El Forum - 10-23-2009, 12:24 AM
Using two databases - by El Forum - 11-04-2009, 09:09 AM
Using two databases - by El Forum - 11-04-2009, 09:16 AM
Using two databases - by El Forum - 11-04-2009, 10:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB