标签:
$list = $Data->join(‘w_read ON w_article.id = w_read.aid‘)->where($where)->order($order)->limit($Page->firstRow.‘,‘.$Page->listRows)->select();
调用由于w_read表中aid有重复,导致w_article调出的数据有的重复调用。解决办法:加group by `aid`将调出数据按aid分组
$list = $Data->join(‘w_read ON w_article.id = w_read.aid‘)->where($where)->group(‘aid‘)->order($order)->limit($Page->firstRow.‘,‘.$Page->listRows)->select();
标签:
原文地址:http://www.cnblogs.com/langxi/p/4489512.html