CodeIgniter Forums

Full Version: Join two different databases
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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.


El Forum

try using the database name in the join:

$this->db->join('database2.table-to-join', '','inner');