• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Join two different databases

#1
[eluser]sheldonnbbaker[/eluser]
Is there any way to do a join from a table in one database to a table in another database with active record?

I know it's possible with plain MySQL, but haven't found a way with AR in CI.

Thanks

#2
[eluser]mah0001[/eluser]
try using the database name in the join:

Code:
$this->db->join('database2.table-to-join', 'database1.table.id= database1.table.id','inner');


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.