MySql中取出每一個分類中的前N條記錄

SELECT a.* FROM ent_news as a WHERE (SELECT COUNT(*) FROM ent_news as b WHERE b.catid=a.catid AND b.id>=a.id) <=6 AND a.status=1 And a.is_position=1web
相關文章
相關標籤/搜索