search problem....

Results 1 to 3 of 3

Thread: search problem....

  1. #1
    vibha Guest

    Default search problem....

    i am designing a search program for hotels.in this search i have a form where the user has to enter the city or chainname or<BR>hotel name or dining or cuisine.Based on the number of values entered,among the above five,the database search should work.<BR>How to go abbout this search?The search should be really fast.<BR>Any help would be appreciated.

  2. #2
    Join Date
    Dec 1969
    Posts
    119

    Default RE: search problem....

    Hi Vibha,<BR><BR>You need to modify the SQL query for each of the situation. I think you should use javascript to check which fields have been filled up and depending upon that, you have to frame your query. Since javascript validates on the client side only, the program will be fast, no doubt.<BR>Hope this helps.<BR>Arvind

  3. #3
    Vikas NIgam Guest

    Default RE: search problem....

    try this:<BR><BR>SQL="select * from tab where 1=1 "<BR>if len(request.Form("City")) &#062; 0 then <BR> SQL = SQL + "and City = " & request.Form("City" & ""<BR>end if <BR>if len(request.Form("chainname")) &#062; 0 then <BR> SQL = SQL + "and chainname = " & request.Form("chainname " & ""<BR>end if <BR><BR>...<BR>response.write SQL<BR>RS.Execute(SQL)

Posting Permissions

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