Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySQL DATE_SUB Birthday Select Satement
- select
- name,
- email,
- birthday
- from members
- where
- month(birthday) = month(now())
- and dayofmonth(birthday) = dayofmonth(now());
- select
- name,
- email,
- birthday
- from members
- where
- month(birthday) = month(DATE_SUB(NOW(), INTERVAL 1 WEEK))
- and dayofmonth(birthday) = dayofmonth(DATE_SUB(NOW(), INTERVAL 1 WEEK));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement