Trying to make "on this date" work
Posted: Mon Jun 05, 2006 3:49 pm
Hi, newbie here.
I have a few thousand dates in a MySQL table (yyyy-mm-dd format) and want an "on this date" section for my php/MySQL-driven site. If, say, it is December 14th, I want it to show anything ending in -12-14. I've experimented with using a % (ex. - WHERE date = '%-12-14'), and that works as long as I tell the query what days to look for. But I want it to automatically look for all -12-14s, or whatever today's month and day is.
Any suggestions?
I have a few thousand dates in a MySQL table (yyyy-mm-dd format) and want an "on this date" section for my php/MySQL-driven site. If, say, it is December 14th, I want it to show anything ending in -12-14. I've experimented with using a % (ex. - WHERE date = '%-12-14'), and that works as long as I tell the query what days to look for. But I want it to automatically look for all -12-14s, or whatever today's month and day is.
Any suggestions?