Welcome Guest, Not a member yet? Register   Sign In
Multiple databases $this->db->join
#3

[eluser]rogierb[/eluser]
Using the db active record it is probably possible but not like your trying now. This will just generate 2 different queries, one for each database.

First try it with a 'normal' sql query like
<code>
Select t1.id, t2.* from db1.mytable t1
left join db2.another_table t2 on (t1.id = td.first_id)
</code>

If you got the working try to rewrite it using active record using only one class.
As long as you make sure your connected to both databases it should work.

I've done it in the past although i'm not sure if it worked with active record


Messages In This Thread
Multiple databases $this->db->join - by El Forum - 07-09-2011, 07:39 AM
Multiple databases $this->db->join - by El Forum - 07-11-2011, 06:30 AM
Multiple databases $this->db->join - by El Forum - 07-12-2011, 08:37 AM
Multiple databases $this->db->join - by El Forum - 07-12-2011, 03:42 PM
Multiple databases $this->db->join - by El Forum - 07-12-2011, 06:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB