修复标签分类查询错误
This commit is contained in:
@@ -1259,11 +1259,13 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
|
|||||||
}*/
|
}*/
|
||||||
$catdata = [];
|
$catdata = [];
|
||||||
if($appid){
|
if($appid){
|
||||||
$sql .= " left join %t t1 on rt.tid = t1.tid
|
$sql .= " left join %t t1 on rt.tid = t1.tid ";
|
||||||
left join %t tr on tr.tid=t1.tid
|
|
||||||
left join %t g on g.cid = tr.cid";
|
|
||||||
$params[] = 'pichome_tag';
|
$params[] = 'pichome_tag';
|
||||||
$params[] = 'pichome_tagrelation';
|
if(!in_array('pichome_tagrelation',$params)){
|
||||||
|
$sql .= " left join %t tr on tr.tid=t1.tid ";
|
||||||
|
$params[] = 'pichome_tagrelation';
|
||||||
|
}
|
||||||
|
$sql .= " left join %t g on g.cid = tr.cid ";
|
||||||
$params[] = 'pichome_taggroup';
|
$params[] = 'pichome_taggroup';
|
||||||
if (!empty($para)) $params = array_merge($params, $para);
|
if (!empty($para)) $params = array_merge($params, $para);
|
||||||
foreach (DB::fetch_all("$sql where $wheresql group by g.cid",$params) as $v) {
|
foreach (DB::fetch_all("$sql where $wheresql group by g.cid",$params) as $v) {
|
||||||
|
|||||||
Reference in New Issue
Block a user