i'm having some problem to write correctly a sql query before perform it through php file writing right code for it.
Actually i have a table sql ( tblperson ) with some person name ( as name ) and their birthday date in it ( yy/mm/dd ), i need to view persons that have made birthdays in last 15 days till today.
I have tried some different queries without success as:
SELECT name, birthday FROM tblperson
WHERE DATEDIFF(birthday,(SELECT DATE_SUB(NOW(), INTERVAL 15 DAY))
SELECT name, birthday FROM tblperson
WHERE DATE(bb) = DATE_SUB(birthday,(NOW(), INTERVAL 15 DAY))
How can I fix it?