tharsan17 Posted August 26, 2013 Share Posted August 26, 2013 I have a database call Profile. In this database i have several fields. Name Gender DOB Language My requirement is advanced search form for homepage. in this search we should able to sort searching. example:- i need to find girls who are speaking English - age between 18 to 23. Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted August 26, 2013 Share Posted August 26, 2013 (edited) OK. I assume the table is called Profile and not the database? If not substitute below: SELECT *, (YEAR(CURDATE()) - YEAR(DOB))as Age FROM Profile WHERE Gender = 'Female' AND Age BETWEEN 18 AND 23 Edited August 26, 2013 by AbraCadaver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.