如何从mysql中的当前日期时间减去30天?
SELECT * FROM table WHERE exec_datetime BETWEEN DATEDIFF(NOW() - 30 days) AND NOW();
SELECT * FROM table WHERE exec_datetime BETWEEN DATE_SUB(NOW(), INTERVAL 30 DAY) AND NOW();
http://dev.mysql.com/doc/refman/5.5/zh-CN/date-and-time- functions.html#function_date-add