$sql = !empty($accessmasks)? "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, ff.description, ff.moderators, ff.icon, ff.viewperm, a.allowview FROM {$tablepre}forums f LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid LEFT JOIN {$tablepre}access a ON a.uid='$discuz_uid' AND a.fid=f.fid WHERE f.status='1' ORDER BY f.type, f.displayorder" : "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, ff.description, ff.moderators, ff.icon, ff.viewperm FROM {$tablepre}forums f LEFT JOIN {$tablepre}forumfields ff USING(fid) WHERE f.status='1' ORDER BY f.type, f.displayorder";
复制代码
改成:
$id='15,16,17,18';$sql = !empty($accessmasks)? "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, ff.description, ff.moderators, ff.icon, ff.viewperm, a.allowview FROM {$tablepre}forums f LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid LEFT JOIN {$tablepre}access a ON a.uid='$discuz_uid' AND a.fid=f.fid WHERE f.status='1' AND f.fid IN ($id) ORDER BY f.type, f.displayorder" : "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, ff.description, ff.moderators, ff.icon, ff.viewperm FROM {$tablepre}forums f LEFT JOIN {$tablepre}forumfields ff USING(fid) WHERE f.status='1' AND f.fid IN ($id) ORDER BY f.type, f.displayorder";