select * from table_name where 时间标志字段 = 'Y' and 时间字段 >= 'date("Y-m-d H:i:s",strtotime("-7 day"))';

解决方案 »

  1.   

    select * from table_name where 时间标志字段 = 'Y' and 时间字段 >= 'date("Y-m-d H:i:s",strtotime("-7 day"))';
    date("Y-m-d H:i:s",strtotime("-7 day")) 表示7天前现在的时间
      

  2.   

    好像不行呀
    这个是我加入的时间2005-03-21 19:56:15
    date("Y-m-d H:i:s",strtotime("-7 day")) 这个等于2005-03-20 14:45:03 
    那么就是2005-03-21 19:56:15 >= 2005-03-20 14:45:03 这样显示不是提交7天内的时间文章呀