请教"统计今天发贴数"的sql语句,发贴时间字段是时间戳,谢谢

解决方案 »

  1.   

    自己答了
    select count(id) as cc from posts where timer>(UNIX_TIMESTAMP(CURRENT_DATE())) and timer<(UNIX_TIMESTAMP(CURRENT_DATE())+86400)select count(id) as cc from posts where timer>UNIX_TIMESTAMP(date_sub(curdate(),interval 1 day)) and timer<(UNIX_TIMESTAMP(date_sub(curdate(),interval 1 day))+86400)来接分吧
      

  2.   

    .
        [align=center]====  ====
    [/align]
    .
    贴子分数<20:对自已的问题不予重视。
    贴子大量未结:对别人的回答不予尊重。
    .