Sorting MySQL table by next due date
Posted
by Zagga
on Stack Overflow
See other posts from Stack Overflow
or by Zagga
Published on 2010-03-15T04:20:31Z
Indexed on
2010/03/15
4:29 UTC
Read the original article
Hit count: 134
mysql-query
Hi folks,
I have a MySQL table that stores (amongst other things) a persons date of birth.
Is there any way to sort the table so the next due birthday is at the top?
I have the date stored in standard yyyy-mm-dd DATE format and seperate year, month and day fields so I can sort it by the first birthday of the year (ORDER BY month, day) but I can't seem to get any further.
Any help would be greatly appreciated.
Zagga
© Stack Overflow or respective owner