I am trying to produce a search form that allows the user to enter up to 4 fields, namely:
Title, First Name, Last Name and City
Scenarios:
- if the user only enter the title (e.g. Mr) and leave all other fields blank, then the result should return all records for the Title = "Mr"
- if the user enters Title="Mr" and City="New*" and leave all other fields blank, then all people with a title of Mr and living in a city that starts with New will be displayed
and so on...
How to generate this query??
Title, First Name, Last Name and City
Scenarios:
- if the user only enter the title (e.g. Mr) and leave all other fields blank, then the result should return all records for the Title = "Mr"
- if the user enters Title="Mr" and City="New*" and leave all other fields blank, then all people with a title of Mr and living in a city that starts with New will be displayed
and so on...
How to generate this query??