tripwater
06-30-2004, 12:41 PM
I have a mysql table that holds a date field ("Y-m-d") format.
This is a birthday.
I would like to select all of the dates in the system and as I loop through, check to see if any are within a week away so I can announce it in a section of the site.
I do not want to convert my field to a unix timestamp because of the work involved changing other things like my calendar script.
I would like to know if I should query for the info and use php functions to convert to timestamp then compare with today's day to see if it is within a week OR handle the conversion in mysql?
Any ideas on the best way to go about this?
Thanks
This is a birthday.
I would like to select all of the dates in the system and as I loop through, check to see if any are within a week away so I can announce it in a section of the site.
I do not want to convert my field to a unix timestamp because of the work involved changing other things like my calendar script.
I would like to know if I should query for the info and use php functions to convert to timestamp then compare with today's day to see if it is within a week OR handle the conversion in mysql?
Any ideas on the best way to go about this?
Thanks