zb3040
V2EX  ›  PHP

thinkphp5 怎么进行跨库关联查询?

  •  
  •   zb3040 · Mar 21, 2017 · 4152 views
    This topic created in 3372 days ago, the information mentioned may be changed or developed.

    1.在内网有两个 SQL server 数据库 ,两个数据库没有在同一个服务器下。
    2.这两个数据库分别客户的消费数据和客户的详细资料,现在需要将这个两个数据库进行联合查询,查询出的结果既有客户的资料,又有客户的消费数据。
    3.这两个数据库有一个相同内容的字段->手机号

    我尝试了我尝试了 Db::connect 和模型关联 都失败了,请教一下各路大神该怎么处理?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2702 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 11:25 · PVG 19:25 · LAX 04:25 · JFK 07:25
    ♥ Do have faith in what you're doing.