时间:2021-07-01 10:21:17 帮助过:25人阅读
$this->db->where('s.sid', explode(',', $sids), '');
}else{
$where = '';
}
还有查询数量的地方
if($atts) {
$attlist = array_values($atts);
$num = count($attlist);
if($num>0){
$or = '';
$sql ='select count(*) as nums from(
select count(sid) count from (
select sid,attid from modoer_subjectatt where ';
foreach($attlist as $attid) {
//$this->db->where_exist("SELECT 1 FROM dbpre_subjectatt st WHERE s.sid=st.sid AND attid=$attid");
if($attid<1)continue;
$sql .= $or . ' attid='.$attid;
$or = ' or ';
}
$sql .= ') as temp
group by sid) as temp1
where count='.$num;
}
}
希望有用到的朋友可以改下,也只是暂时解决办法。另有问题请联系qq 272164179
http://www.bkjia.com/PHPjc/626609.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/626609.htmlTechArticle在 http://www.modoer.org/beijing/item/list-8 的页面中,会执行以下2个sql SELECT s.sid,pid,catid,domain,name,avgsort,sort1,sort2,sort3,sort4,sort5,sort6,sort7,sort8,best,...