Home  >  Article  >  Backend Development  >  thinkphp这么玩关联查询(实例教会你)

thinkphp这么玩关联查询(实例教会你)

WBOY
WBOYOriginal
2016-06-13 12:37:41872browse

thinkphp这样玩关联查询(实例教会你)

thinkphp实例,内连接实现多表中同时查找,并存在了一个数组中,返回到模板中,模板中volist遍历即可使用多表中的字段

$row=M()->query("select realname,email,guanzhu,law_friends_follow.id,law_friends_follow.uid,law_friends_follow.followid from law_member left join law_friends_follow on law_member.uid=law_friends_follow.followid where law_member.uid in ($followids) limit ".$d->firstRow.','.$d->listRows.";");


以上而且带翻页……

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn