不知道包内模板的调用更新了没有啊。图片调用有些问题,不能按分类调用,就是下面红色部位的代码,如果设置了分类数值(26,27,28,29,30,35)图片只能调一张出来,去掉红色部位代码又能是全站的图片,望楼主给看看。
$query = $db->query("SELECT attach.aid, attach.attachment, attach.uid, t.tid, t.fid, t.subject,p.dateline, p.message FROM {$tablepre}attachments attach LEFT JOIN {$tablepre}threads t ON t.tid=attach.tid LEFT JOIN {$tablepre}posts p on p.tid=attach.tid WHERE attach.readperm='0' AND t.fid in (26,27,28,29,30,35) AND filetype IN ('image/pjpeg','image/gif') GROUP BY attach.tid ORDER BY rand() DESC LIMIT 2"); |