|
| |
|
|
Mav44
Posts: 122 Joined: 6/25/2006 Status: offline
|
"OR" statement in Default line - 6/2/2007 15:34:02
Hi Guys & Gals, Is it possible to use an "or" in a default line such as: fp_sDefault="o_category=schools or daycare&bf_map=y" I know I have written this wrong becuase I get nothing back. I think I made need to get rid of the spaces. Thanks for your time and help in advance!
|
|
|
|
BeTheBall
Posts: 6359 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
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 &"
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Mav44
Posts: 122 Joined: 6/25/2006 Status: offline
|
RE: "OR" statement in Default line - 6/3/2007 23:04:45
Thanks for the answer and suggestion!
|
|
|
|
BeTheBall
Posts: 6359 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: "OR" statement in Default line - 6/4/2007 10:36:08
No problem. The last two sentences in my previous post should be ignored. I changed my response and those two lines were left over from the first draft.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|