Search return question

Results 1 to 2 of 2

Thread: Search return question

  1. #1
    Join Date
    Dec 1969

    Default Search return question

    Hello, <BR><BR>I&#039;ve got a Calendar of Events section on my web site and I want the search to return the name of an event no matter what part of the event name people enter in the Search by Name field. For example, we list the East-West Shrine Game on our site and people can find it by typing in any part of that name. However, they cannot find it by typing in Shrine East-West Game because it is listed as East-West Shrine Game not Shrine East-West Game. How do I set it up so that the search will return the event name no matter what part of the name people type in. Using ASP with a SQL database. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Search return question

    You need to split the phrase entered on spaces and then create a query that looks for &#039;%&#060;element&#062;%&#039; in the proper column.<BR><BR>userinputarray=split(Request.form(" userinput), " ")<BR>querystring="select * from stuff where mycolumn="<BR>for each element in userinputarray<BR>querystring=querystring&"&#039;% "&element&"%&#039; or "<BR>next<BR>querystring=left(querystring, len(querystring)-4)

Posting Permissions

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