I want to use one set of conditionals for a simple search, and another set for a complex search.
if @advsearch = 1
WHERE column1 = searchcrit1 AND column2 = searchcrit2 AND column3 = searchcrit3
WHERE column1 = searchcrit OR column2 = searchcrit OR column3 = searchcrit
Advanced search means you are given 1..Nth criteria that correspond to 1..Nth columns in the table. So it would be something like "bring back all records where name like 'nib' and address like '123' and state is california.
Whereas the simple search means you are given ONE criteria and you match it against 1..Nth columns to see if any of them contain the information. So it would be something like "bring back all records where name is like 'nib' or address is like 'nib' or city is like 'nib'.