直接调取discuz 群组信息的sql语句

记录一下方便以后使用,sql查询语句!方便二次开发
SELECT t.*,p.message,p.pid,f.name
FROM ".DB::table("forum_thread")." t 
LEFT JOIN ".DB::table("forum_post")." p on p.tid=t.tid 
LEFT JOIN ".DB::table("forum_forum")." f on f.fid=t.fid
WHERE DATE_SUB(CURDATE(), INTERVAL $day DAY) <= FROM_UNIXTIME(t.`dateline`, '%Y-%m-%d') AND t.`fid` not in ($fids) $_digest and t.displayorder>=0 and p.first=1 and t.isgroup = '1'
group by t.tid 
ORDER BY t.`$order` DESC
LIMIT $begin , $num");
复制代码