how can i run a query that joins two tables from TWO different Databases in mssql_query or mysql_query in php for example
$conn=mssql_connect($ip,$username,$password);
mssql_select_db("DB1",$conn);
$q="select A.name,B.ID from DB1.dbo.T1 A, DB2.dbo.T2 B where A.ID=B.ID";
$res=mssql_query($q);
nasıl böyle bir sorgu çalıştırmak için?