I have a BirthDate column in MySQL database table to store user's date of birth. Now I have form in html/php with two fields(1. Age From 2. Age To).
If user want to get all users where their ages are between 10 years and 20 years, Is it possible to do this with MySQL query using BirthDate column.
Thanks
You can get like this
It can also be achived by using a sub query:
Your query would look similar to this:
Another solution which checks the year and the month: