Here is a way to find out the age of someone from his birthdate stored in a date field called "birthdate" (YYYY-MM-DD) :
SELECT FLOOR(PERIOD_DIFF(LEFT(CURDATE()+0, 6),LEFT(REPLACE(birthdate, '-', ''), 6)) / 12) AS age FROM ... etc...
That's all!
-----------------------------
SELECT FLOOR(PERIOD_DIFF(LEFT(CURDATE()+0, 6),LEFT(REPLACE(birthdate, '-', ''), 6)) / 12) AS age FROM ... etc...
That's all!
-----------------------------