Heim  >  Artikel  >  Backend-Entwicklung  >  thinkphp四级关联查询怎么写

thinkphp四级关联查询怎么写

WBOY
WBOYOriginal
2016-06-23 13:44:33863Durchsuche

thinkphp四级关联查询怎么写?关系:A在B的aid,B在C的bid,C在D的Cid,怎样关联起来呢?
A-->B-->C-->D
M("D")->jion("A on B.aid=A.id)->jion("B on C.bid=B.id)->jion("C on D.cid=C.id) 这样写不对


回复讨论(解决方案)

帮帮忙呀,愁死了

直接用MANY_TO_MANY

用视图模型好点

直接用MANY_TO_MANY


不用模型,直接在action里写


直接用MANY_TO_MANY


不用模型,直接在action里写
那你直接写原生的吧



直接用MANY_TO_MANY


不用模型,直接在action里写
那你直接写原生的吧
原生的也不会写呀
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn