I have students details in my database.
status (Active, Not Active)
I also have a search form on the views that I want to use to search students based on different conditions.
For example, I may want to search these
1. All female students who were born between date1 to date2 and have paid x amount of fees.
2. All students called Ali who have paid x amount of fees.
3. All Active students who have not paid any fees.
My question, how can I simply check, if a field is set, then use it in a query, otherwise don't include it in the query. Also for DOB, search is by date range.