dongqiao9015 2014-09-01 15:48
浏览 27

连接到2个或更多数据库,并从同一主机中这些数据库中的表中进行选择

Connect to 2 or more databases and select from tables in those databases.

I never needed this before, but now...i really do need! :)

I've googled but i could not find the right answer.

I need to connect to 2 or more database and then, if i need to, i want to select info from tables that are in one or more databases, using JOIN for example.

I have a user that has access to all databases and databases are all in the same host. I'm using mysqli.

How do i do this?

Thank you very much.

  • 写回答

1条回答 默认 最新

  • duan20145 2014-09-01 15:55
    关注
    SELECT * from db1.table ...
    LEFT JOIN db2.table ON ...
    
    评论

报告相同问题?

悬赏问题

  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效