search ALL or SPECIFIC

Results 1 to 2 of 2

Thread: search ALL or SPECIFIC

  1. #1
    Join Date
    Dec 1969

    Default search ALL or SPECIFIC

    Hi there (again)<BR><BR>here is my SQL for my results pages of a search<BR><BR>rsMAIN.Source = "SELECT * FROM hindley WHERE prop_type = &#039;"&Request.QueryString("ptype")&"&#039; AND prop_area = &#039;"&Request.QueryString("parea")&"&#039; AND " & strSearch <BR><BR><BR>Which ptype and parea are both drop down menus from the seach page and strSearch is for a keyword search.<BR><BR>Now on all the pages I want just a a text field which is like a quick search but the results are displayed on the same results page as the main search.<BR><BR>So I set two hidden fields next to the textfield(other) called ptype and parea and gave them a value of ALL.<BR><BR>How do you construct your sql to say if the <BR><BR>IF Request.QueryString("ptype") = "ALL" then display all property types for this query

  2. #2
    Join Date
    Dec 1969

    Default RE: search ALL or SPECIFIC

    The following works for me. Suggest you change "ALL" for "%":<BR><BR>and db_field_name LIKE &#039;%"& request("form_field_name") &"%&#039;

Posting Permissions

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