本帖最后由 ACMAIN_CHM 于 2012-11-12 23:00:22 编辑

解决方案 »

  1.   

    order by topic_id,post_date desc
      

  2.   

     select a.*
     from 数据库表  a,(select topic_id,max(post_date) as k from 数据库表  group by topic_id) b
     where a.topic_id=b.topic_id
     order by b.k desc,b.topic_id
      

  3.   

    select *
    from 数据库表 a
    order by (select max(post_date from) 数据库表 where topic_id=a.topic_id ) desc,topic_id