V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zb3040
V2EX  ›  PHP

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

  •  
  •   zb3040 · Mar 21, 2017 · 4076 views
    This topic created in 3329 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   ·   886 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 18:53 · PVG 02:53 · LAX 11:53 · JFK 14:53
    ♥ Do have faith in what you're doing.