douyi2798 2019-06-18 10:14
浏览 66

PHP执行一个使用两个数据库的SQL语句

I have a mysql and the account can access two DB. One of the DB (testdb) only have read only access, and the temp DB (tmpdb) have read write access. Because I need to handle huge amount of data, so I need to create temporary table and don't want to use PHP insert data one by one from testdb to tmpdb. Is it possible PHP can execute a SQL like below which need to access two DB at the same time?

    CREATE TEMPORARY TABLE tmpdb.tmp_customers AS (
        SELECT *
        FROM testdb.customers
        WHERE country='Mexico'
    );
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求解达问题(有红包)
    • ¥15 请解包一个pak文件
    • ¥15 不同系统编译兼容问题
    • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
    • ¥30 数字电源对DSP芯片的具体要求
    • ¥20 antv g6 折线边如何变为钝角
    • ¥30 如何在Matlab或Python中 设置饼图的高度
    • ¥15 nginx中的CORS策略应该如何配置
    • ¥30 信号与系统实验:采样定理分析
    • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao