thinkphp多张表的关联查询

[tw, al_breedtaskdetail, al_pool]三张表的关联查询

$twList = M("tw")->table("tw as a")->
join("al_breedtaskdetail as b on a.taskid=b.id")->
join('al_pool as c on a.breedarea=c.breedarea and a.poolnum=c.poolnum')->
field('a.id,  a.taskid')->select();
posted @ 2020-07-02 10:44  Loading~  阅读(208)  评论(0编辑  收藏  举报