10 messages in com.mysql.lists.mysqlRe: Birthday strategy| From | Sent On | Attachments |
|---|---|---|
| Pooly | 24 Aug 2005 09:02 | |
| Jason Pyeron | 24 Aug 2005 09:12 | |
| Pooly | 24 Aug 2005 09:39 | |
| Gleb Paharenko | 24 Aug 2005 10:31 | |
| Dan Baker | 24 Aug 2005 13:00 | |
| Terence | 24 Aug 2005 21:30 | |
| Terence | 24 Aug 2005 21:38 | |
| Gleb Paharenko | 25 Aug 2005 00:49 | |
| Jigal van Hemert | 25 Aug 2005 00:53 | |
| Pooly | 25 Aug 2005 01:40 |
| Subject: | Re: Birthday strategy![]() |
|---|---|
| From: | Pooly (poo...@gmail.com) |
| Date: | 08/24/2005 09:39:06 AM |
| List: | com.mysql.lists.mysql |
2005/8/24, Cummings, Shawn (GNAPs) <sha...@gnaps.com>:
The 29th wouldn't be an issue because if that is their birthday -- and today is 2/29 -- it will show up.
It will only happen once every 4 years... I'll go with the two fields solution and make a special case for leap years. thanks for your help.
Pooly wrote:
Hi,
I would like to display a list of members who have their birthday a given day (today for instance). My idea is to store their birth date in a column, and then query the table against the column. But the query would be like : select id from members where MONTH(birthday) = MONTH(NOW()) AND DAY(birthday)=DAY(NOW()) but it would perform a entire table scan with that. What would be your best strategy for that sort of query ? And how would you deal with 29th of february ?
-- Pooly Webzine Rock : http://www.w-fenec.org/




