MYSQL 查询一个月内数据的SQL语句
Posted on | 7月 3, 2011 | 2 Comments
select * from phome_ecms_info where DATE_SUB(CURDATE(), INTERVAL 1 MONTH) <= DATE(FROM_UNIXTIME(newstime)) and checked=1 order by onclick desc limit 15
Comments
2 Responses to “MYSQL 查询一个月内数据的SQL语句”
Leave a Reply
10月 15th, 2011 @ 下午 12:49
错误的
10月 15th, 2011 @ 下午 12:49
根本就没用
下面的是计算一个月内数据
and to_days(now())-to_days(o.createtime)<30