【问题标题】:How to pass two connections to mysqli_query for running SELECT INTO query with two different server databasesHow to pass two connections to mysqli_query for running SELECT INTO query with two different server databases
【发布时间】:2022-12-01 14:13:01
【问题描述】:

My query is that I need to run a SELECT INTO query from One Server Database Table to Another Server Database Table. For that I am having two different mysqli_connect() connections so how can I run this query through mysqli_query as far as I know we can pass only one connection to it through arguments. Or is there any other way out to perform the same.

【问题讨论】:

    标签: php mysql database mysqli


    【解决方案1】:

    You can first create one connection of the first database through mysqli_query() and then take that output and store it into temp variable and then create another second server connection and then manipulate your data!!

    I hope this answers your question!

    【讨论】:

    • Hi thanks for the revert but I am not able to understand your point. Are you saying I select the Data from one server DB query and keep it and then again perform the insert query on the second server DB?
    猜你喜欢
    • 2022-12-01
    • 1970-01-01
    • 2022-12-27
    • 2022-11-20
    • 2022-12-26
    • 1970-01-01
    • 2022-11-09
    • 2013-04-23
    • 2022-12-01
    相关资源
    最近更新 更多