Closed Thread
Results 1 to 3 of 3

Thread: ASP Search problems

  1. #1
    Junior Member DaveB is an unknown quantity at this point
    Join Date
    Feb 2001
    Posts
    2

    Angry

    Part of my web site is searching for a person. To do this you have to select their, ---, hair colour, eye colour, height etc, in drop down menus.

    The search works fine but I cannot find a way of creating an option for selecting any height, any hair colour etc. I need something that represents 'any file'

    The following is my code.


    town = request.querystring("town")
    --- = request.querystring("---")
    eyes = request.querystring("eyes")
    build = request.querystring("build")
    age = request.querystring("age")
    size = request.querystring("height")
    folicles = request.querystring("hairy")


    strProvider="DRIVER=Microsoft Access Driver (*.mdb); DBQ=c:\inetpub\wwwroot\FindaDate.mdb;"
    set rs = server.createobject("adodb.recordset")
    sqlstmt = "SELECT * from CustomerDetails where Hair = '"&folicles&"' AND Height = '"&size&"' AND Towns = '"&town&"' AND Build = '"&build&"' AND Eyes = '"&eyes&"' AND Gender = '"&---&"' "
    rs.open sqlstmt, strprovider

    If rs.eof then
    response.write "<center>There are no records in the database"
    response.write "<br>Please check back later</center>"
    response.end
    Else


  2. #2
    Beans
    Guest

    Lightbulb

    Please clarify.

    Use INNER JOIN instead of multiple AND's in your query. That would make your work easier.

  3. #3
    Junior Member DaveB is an unknown quantity at this point
    Join Date
    Feb 2001
    Posts
    2

    More Detail

    In a drop down menu you have 4 choices.

    Black
    Blue
    Green
    Any Colour

    I want to be able to search for any colour on three or four drop down menus. I have no problem in searching for the specific colours as I just have to SELECT from CustomerDetails Where Colour = '"& colour &"'.

    If the user is not bothered about the colour hair they want they can choose 'Any Colour' and people with Black, Blue and Green hair are selected.

    Hope this is more specific

    Cheers

Closed Thread

Bookmarks

Posting Permissions

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