Calculating MySQL Age from Date of Birth Column and Selecting Records Between Age Range

While developing a Facebook Dating app recently, I needed to return records for a date range between minimum and maximum age from users table but the data was in the date format (birthday). Following select command will calculate the age from the `birthday` column value for you for each record: SELECT EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(),`birthday`))))+0 AS…