February 9th, 2001, 07:00
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>"
February 11th, 2001, 22:53
Use INNER JOIN instead of multiple AND's in your query. That would make your work easier.
February 12th, 2001, 10:57
In a drop down menu you have 4 choices.
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