CodeIgniter Forums
join beteween two tables in diferent db - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: join beteween two tables in diferent db (/showthread.php?tid=12201)



join beteween two tables in diferent db - El Forum - 10-09-2008

[eluser]mmiranda[/eluser]
Hi, i have an voip appliance with mssql server with two databases, agent and billing, for some reason in the billing db there is not the telephone number in any table, it is in the agent db, so i have to join two tables within diferent db's, ie:

select a.timeOfBilling, a.credit, a.charge, b.cli

from BILLING.dbo.billing_200712 a, AGENT.dbo.multi_cli b

where a.productName=b.productName

and a.batchNumber=b.batchNumber

and a.serialNumber=b.serialNumber

How (if posible) can i code that query in codeignitor's active record library?