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?
Trying to make "on this date" work
Moderator: General Moderators
Check out the mysql date functions
http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
There is about 3 ways to do it
http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
There is about 3 ways to do it