直接上代码

select * from [!db.pre!]ecms_news where classid in (select classid from [!db.pre!]enewsclass where bclassid in (7,8,9)) order by onclick DESC limit 8