这是表结构
下面是SQL语句
SELECT newsid,title,classid FROM news a
WHERE (SELECT count(*) FROM news b WHERE b.classid=a.classid AND b.newsID>a.newsID)<5
ORDER BY classid desc,newsID desc
WHERE (SELECT count(*) FROM news b WHERE b.classid=a.classid AND b.newsID>a.newsID)<5
ORDER BY classid desc,newsID desc