select * from feed where updated > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
To get the last month records
select * from feed where updated between
DATE_SUB(CURRENT_DATE, INTERVAL 2 MONTH) and DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
you can use INTERVAL 1 DAY, INTERVAL 1 WEEK, INTERVAL 2 MONTH ETC.,
Used the DATE_SUB function
Fri, 09/03/2010 - 13:37 — sridhar_piUsed the DATE_SUB function to get the records
select * from feed where updated > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
To get the last month records
select * from feed where updated between
DATE_SUB(CURRENT_DATE, INTERVAL 2 MONTH) and DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
you can use INTERVAL 1 DAY, INTERVAL 1 WEEK, INTERVAL 2 MONTH ETC.,