Possible to use "OR" in query string?

Results 1 to 4 of 4

Thread: Possible to use "OR" in query string?

  1. #1
    Join Date
    Dec 1969

    Default Possible to use "OR" in query string?

    I&#039;m trying to set up a link that will grab and display selected data on my page using a query string AND using "OR"... similar to this:<BR><BR>pagename.asp?color=blueORgreen<BR><BR >Is this possible (obviously my syntax is wrong)? Are their query characters for "OR" .... like "&" for "and"? I&#039;ve used & plenty of times, but really need OR now.... any ideas???? THANKS<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Possible to use

    & ia NOT really "and" that is what i used to concatinate the various parameters you want to pass to the next page in the QS....it does NO function of a "and"<BR><BR><BR>if you wnat to pass either blue or greem why not an IF...THEN condition?? and only pass what you want....i really dont know on what basis you wnat to pass the color

  3. #3
    New ASP Guest

    Default RE: Possible to use

    1. pagename.asp?color=blue<BR><BR>2. in pagename.asp<BR><BR>Select case request.querystring("color")<BR>case "blue", "green" &#039;&#060;-- Case sensitive<BR>sql = "...."<BR>case "red"<BR>sql = "..."<BR>end select<BR><BR>:<BR>:<BR><BR>

  4. #4
    Conrad Guest

    Default RE: Possible to use

    The &#039;&&#039; does not stand for &#039;AND&#039; it is a delimter in the querystring. It separates the name/value pairs.<BR><BR>What you need to do is let the user select the color on the form or linking page so that it is sent to the receiving page where your code can decide what to do with it.<BR><BR>Good luck.<BR>Conrad<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts