If birthdate's are stored as type "Date" in MySQL, how would you determine if it's a specific user's birthday today in PHP?
Is it simply a matter of grabbing the birthdate column value, doing on a explode on the
Since you'll need to exclude the year, you can use the
DAY SQL functions like so:
SELECT * FROM table WHERE MONTH(birthday) = MONTH(NOW()) AND DAY(birthday) = DAY(NOW());
Don't forget to add an index on this column or it will seriously degrade performance as data grows.
In PHP, you can just use the date function:
if (date('m-d', strtotime($row['date'])) == date('m-d')) //-- Today is my birthday! Hooray!