I am trying to display the next birthday from my DB but I've run into issues. I've tried using a single field (DATE) as well as breaking it down into separate fields (month, day...). I've tried to have the if statement look at each field comparing it to the current date but it fails. It sees that it matches the month (1st field) and says person x has a birthday...but this persons bday was on the 2nd.
I received the following as the first part of a resolution, I just don't completely get the structure:
SELECT dob +
INTERVAL YEAR(CURRENT_DATE)
- YEAR(dob)
YEAR AS birthday_thisyear
FROM daTable
Is there another way or can someone help me with this?