I have a project that I want the user to choose one of the 4 possible period time to view the sales situation during the specific period, the type for the time is "radio" , for example: this week, last week,last month, from today forward , also, I will give the user another choice, they can specific a beginning and ending time also. How can I do the query to match different choice? I think the query that I will do will be different with the choice "this week" and "this month". I wonder if I can use several if else to do that? that is, if they choose this week, I will do a different query, if they choose "this month", the query condition also will be different? but how about the query if they user specify the time by themself rather than to choose one.