日期:2014-05-17  浏览次数:20604 次

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.";");


以上而且带翻页……