Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    7

    Unanswered: And the search goes on...

    Hi People,

    Having major trouble wondering if you can help. I have a search page with three text boxes, where i want the user to be able to search for albums in my database based on a combination of artist name, album name or genre(this is a drop down box) or all three if they want.

    I've tried starting out simple and just done

    strSQL="select * from albums"

    If stralbumname<>"" Then
    strSQL=strSQL + "where album_name like '%"& stralbumname &"%'"
    End If

    But it just wont work, instead i get a list of all the albums regardless of whether i type something in the text box or not.

    Any ideas would be much apreciated thanks

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Perhaps this may hopefully give you some ideas:

    Classic ASP Design Tips - Search Criteria on Multiple Fields
    http://www.bullschmidt.com/devtip-searchcriteria.asp
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Jan 2005
    Posts
    7
    Hey

    Thanks for the reply, article was really helpful and now my search facility works great!!

    Thanks

Posting Permissions

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