Forum Moderators: open
I know how to select all the rows that I have added in the past 3 days:
SELECT * FROM table WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_column;
However, I can't figure out how to select all the rows that are due to expire in the next 3 days (today, tomorrow or the day after)? Can anyone help, please?
"2 day" if you consider today as one of the three days. If the first day you want to query is tomorrow,
select * from table where date_column > curdate() and date_column <= date_add(curdate(),interval 3 day);