Hello Basically having problems trying to think of a solution for performing age range search on my database. For Example. 18years - 24years. I am storing the date of birth in my database as such YYYY-mm-dd I have tried using < >= within my mysql query but these seem to do nothing. Anyone got any idea? Regards
Something like this: select * from user where dateofbirth >= '1990-02-03 13:35:44' && dateofbirth <= '1999-02-03 13:35:44' Code (markup): So make the date range (start and end) for the age filter you need and compare that way. You will want to format the date/time of the start and end vars to the same format as used in the database and use the current time.