table bday
user int
mon int
day int
On Wed, 24 Aug 2005, 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 ?
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager 7 West 24th Street #100 -
- +1 (443) 921-0381 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately. Any other use of the email by you
is prohibited.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]