I've my project A with mySql database and that i have another project B with msSql. I've connected the database from the and fetched data from B. However I have to use inner join for tables inside a and B. Can you really achieve this with databases within the same server and various server? Any assistance will be appreciated.
Thanks ahead of time
Yes, it ought to be possible. First, you will have to link your MySQL server for your MS SQL Server.
See this reference. Next, you'll most likely want to use sub queries to choose the right posts and perform the join in it
SELECT * FROM (SELECT ms_column1, ms_column2 FROM MSSQLTABLE) AS mssql JOIN (SELECT my_column1, my_column2 FROM openquery(LINKED_SERVER, 'SELECT column1, column2 FROM MYSQLTABLE') AS mysql ON mssql.ms_column1 = mysql.my_column1
Rather than making the 2 different databases communicate between themselves you are able to slowly move the logic from the communication towards the programming layer. For instance using PDO and PHP you are able to connect with both databases, obtain the data, mix it and convey an effect. You may create an abstraction layer of PHP classes that will get information individually from the or B databases, and then you won't care any longer about this, because you will use PHP objects in a roundabout way with databases.