In a table with persons and their birthdays, the ones whose birthday is in less than 7 days need to be displayed.
I found some answers on the Internet but they all are at least 5 years ago with DATEDIFF that has 3 arguments instead of 2 and that doesn't help me.
I've just begun to work with Mysql and Workbench so, please, just change my simple syntax.
SELECT * FROM list WHERE MONTH(ls_bday) = 1 OR (ls_bday) = 2 and dayofmonth(ls_bday) < dayofmonth(current_time()+8)
or to include something in:
SELECT DATEDIFF(ls_bday, current_date()) from list
Thank you in advance.