|
BeTheBall -> RE: "OR" statement in Default line (6/3/2007 13:29:48)
|
I would say no it is not possible. What the default does is assign a default value to the form field or querystring value you are searching on. Putting a default value with an or will just create one text string with an OR in it. For example, instead of returning records where the field "animal" is equal to "cat" or "dog", the database would be searched for animals that equal "cat or dog". Does that make sense? You could use ASP to create alternative SQL strings. For example, <% if Trim(Request.Form("animal")) &"" = "" Then mySQL = "SQL using a default string for the blank field" else mySQL = "Standard SQL using the form field value" end if %> Does that make any sense? Then, in your SQL you would use: WHERE animal = &" myVar &"
|
|
|
|