How to compare only day and month with date field in mysql? For example, I\'ve a date in one table: 2014-07-10
2014-07-10
Similarly, another date 2000-07-10<
2000-07-10<
You could use DATE_FORMAT:
DATE_FORMAT
SELECT * FROM `table` WHERE DATE_FORMAT(STR_TO_DATE(`field`, '%Y-%m-%d'), '%d-%m') = DATE_FORMAT(STR_TO_DATE('2000-07-10','%Y-%m-%d'), '%d-%m')
also the second WHERE is not valid. Anyway you would want to get all rows not only id=1
WHERE
id=1