使用related标签的时候,使用join,SQL报错。
{related module=article field=catid,title,description,thumb,url,inputtime,uid,name tag=$tag num=12 join=member on=uid,id order=updatetime cache=3600}之前是可以这样用的,升级应用后就不行了,提示报错。
mysqli_sql_exception #1052 Column 'id' in IN/ALL/ANY subquery is ambiguous
$sql[] = 'id in (select cid from `'.XR_M()->dbprefix($system['site'].'_tag_{xunruicms_mid}').'` where tid='.$tid.')';$sql[] = '`'.XR_M()->dbprefix($system['site'].'_{xunruicms_mid}').'`.id in (select cid from `'.XR_M()->dbprefix($system['site'].'_tag_{xunruicms_mid}').'` where tid='.$tid.')';这样就行了