Jump to content

Date ordered by month and day, NOT by year


AikenAiken

Recommended Posts

The date-field in table birthdays looks like this:

1948-12-31

1993-09-14

1976-08-22

1933-08-25

1955-10-15

etc

 

When I use this query (found on this forum):

SELECT * FROM birthdays WHERE FROM_UNIXTIME(date) >= CURDATE() ORDER BY date DESC LIMIT 5

 

the problem is it searches from the current year, 2009, so no birthdays show up.

 

Is there a mysql/php-solution in which I can see the birthdays in the coming week?

This should calculate into the next month, of course.

 

Thanks in advance for any help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.