php - How to get Age in Months using BirthDate column by MySQL query? -


first asked this question , accepted answer helped me. problem have calculate age in months.

question:

i have birthdate column in mysql database table store user's date of birth. have form in html/php 2 fields(1. age 2. age to).

if user want users ages between 400 months , 600 months, possible mysql query using birthdate column.

thanks

  select * [table]   birthdate>= date_sub(curdate(),interval 600 month) ,  birthdate<= date_sub(curdate(),interval 400 month)  

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -