标签:amp left join empty related sel ble status from mit
if(!empty($site) && $site != 9){
$siteword = $site;
$sql = ‘SELECT c.id, c.name, c.related_page,c.suitable_siteids, REPLACE(suitable_siteids, 0, 1234567)as rn,c.suitable_sex_flag, c.app_order, c.status, g.num FROM wis_hotwords c LEFT JOIN (select hotwords_id, count(hotwords_id) as num
from wis_hotwords_log as t
where ‘.$whereLog.‘
group by(hotwords_id)) as g ON c.id = g.hotwords_id where ‘.$where.‘ order by ‘. $orderWhere.‘ LIMIT ‘.$offset.‘ , ‘.$pageSize;
}else{
$sql = ‘SELECT c.id, c.name, c.related_page,c.suitable_siteids,c.suitable_sex_flag, c.app_order, c.status, g.num FROM wis_hotwords c LEFT JOIN (select hotwords_id, count(hotwords_id) as num
from wis_hotwords_log as t
where ‘.$whereLog.‘
group by(hotwords_id)) as g ON c.id = g.hotwords_id where ‘.$where.‘ order by ‘. $orderWhere.‘ LIMIT ‘.$offset.‘ , ‘.$pageSize;
}
标签:amp left join empty related sel ble status from mit
原文地址:https://www.cnblogs.com/258w/p/9648019.html