hello all,
I've succeeded in creating a database search that will retrieve a wine name depending on what the user types in the dynamic text field. I am using this code to retrieve anything similar to what the user types. First it uses a dropdown list where the user can select red, white or champagne. I use this dropdown as a filter for the db.
sqlStr="SELECT*FROM wine WHERE wine_name LIKE '%" &_
Request.form("mySearch"&"%'"
'if red wine is chosen from drop down
if Request.form("winetype"= "red" THEN
sqlStr=sqlStr & "AND wine_type='red'"
end if
Can someone tell me how to go about having my sqlStr more specific. As of right now, if the user types in the letter 'a' then 'Robert Mondavi' because it has the letter 'a' in it. I assume I need some sort of string breakdown that checks ea. letter in order as its typed. Can anyone give me direction
I've succeeded in creating a database search that will retrieve a wine name depending on what the user types in the dynamic text field. I am using this code to retrieve anything similar to what the user types. First it uses a dropdown list where the user can select red, white or champagne. I use this dropdown as a filter for the db.
sqlStr="SELECT*FROM wine WHERE wine_name LIKE '%" &_
Request.form("mySearch"&"%'"
'if red wine is chosen from drop down
if Request.form("winetype"= "red" THEN
sqlStr=sqlStr & "AND wine_type='red'"
end if
Can someone tell me how to go about having my sqlStr more specific. As of right now, if the user types in the letter 'a' then 'Robert Mondavi' because it has the letter 'a' in it. I assume I need some sort of string breakdown that checks ea. letter in order as its typed. Can anyone give me direction