SELECT * FROM table
WHERE exec_datetime BETWEEN DATE_SUB(NOW(), INTERVAL 30 DAY) AND NOW();
http://dev .mysql.com/doc/refman/5.5/en/data-i-godzina-funkcje.html#function_date-add
SELECT * FROM table
WHERE exec_datetime BETWEEN DATE_SUB(NOW(), INTERVAL 30 DAY) AND NOW();
http://dev .mysql.com/doc/refman/5.5/en/data-i-godzina-funkcje.html#function_date-add