Welcome Guest, Not a member yet? Register   Sign In
Using multiple databases with helper files
#2

[eluser]ryan656[/eluser]
I just read my post and it may be a bit confusing, basically I am looking for a way to access multiple databases (loaded in a controller) from a helper file.


If this is how you load multiple databases:

$DB1 = $this->load->database('group_one', TRUE);
$DB2 = $this->load->database('group_two', TRUE);

And this is how you access the CI instance in the helper file:

$ci =& get_instance();

How do you use the CI instance to access the DB's loaded in the controller?

Again, I've tried:

$ci->db1->query(); and $db1->query() - neither of which seem to work.


Thanks again,
Ryan


Messages In This Thread
Using multiple databases with helper files - by El Forum - 12-06-2009, 01:41 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 01:49 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:04 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:09 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:12 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:29 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:37 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:49 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 02:57 AM
Using multiple databases with helper files - by El Forum - 12-06-2009, 03:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB