Hi,
I am trying to create a form which will fetch the details from the description and Action & Resolution (boxed in red)from the database of same table.
User can select any of the 10 fields (minimum one and maximum 10) and when he presses the "Fetch Ticket Details" button the values in the Red box have to retrieved.
The problem here is: Query should be built on run time based on the values chosen above the red box.
Eg: If user chooses to enter values of status as 1 and category as 1 then the "where" clause should have only the two conditions with "AND" operator. like wise if user chooses to enter values for 4 fields or 5 etc. The fields the user chose not enter should not be in the where condition of the query.
Please help me to find the solution to write the query dynamically based on the values chosen.
I am attaching the screen shot to explain.
Cheers.