john010117 Posted January 6, 2008 Share Posted January 6, 2008 First of all, I've scoured Google, but they only gave me how to calculate age by given birth. I need the opposite. So, here's the thing. I have a pretty simple site that has the basic user database, and a search engine. When a user registers, their date of birth (that they have provided) is converted into a UNIX timestamp and is stored in the database. Now, the search engine is designed so that a user can give a range of ages to search for (ex: can find all users between the ages of 18 to 30). Since I have users' date of birth stored in the database, not their ages, how will I design the script to work? Will converting the given ages to UNIX timestamps first, then using MySQL's "<" and ">" operators to search the database work? Or is there a different way? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.