How to Connect two databases on two different servers using php

后端 未结 2 1512
日久生厌
日久生厌 2021-01-29 04:37

In MySQL, I have two different databases -- let\'s call them A and B.

Database A resides on server server1, while database B resides on server server2.

Both serv

2条回答
  •  -上瘾入骨i
    2021-01-29 05:03

    The only way I can think of, is by opening 2 separate connections (i.e. instantiate 2 PDO objects) with all the different parameters, use 2 queries to query all the data you need into PHP, and then work with that on PHP.

提交回复
热议问题