Knowers of all (I have cross-posted this question to two different lists hence the BCC to not cause unwanted traffic so reply either on list or directly to me off list, its your choice);
I am trying to execute the following MySQL statement and am coming up a croppa'
SELECT name FROM `visitor` WHERE dob = DATE_SUB(CURDATE(), INTERVAL 21 YEAR)
This is to select everyone from a table who is 21 years old, just as an example. The statement runs and returns with no errors but returns no entries (and there are entries that are 21 years old)
Ultimately I am going to do something like this (I am just free-writing this so the syntax is probably wrong but hopefully you will get the idea);
SELECT name FROM `visitor` WHERE dob BETWEEN DATE_SUB(CURDATE(), INTERVAL 21 YEAR) AND DATE_SUB(CURDATE(), INTERVAL 30 YEAR)
to get everyone who is between X and Y years old. Do people think the problem is in my statement or my database?