mann95
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by mann95
-
-
I'm trying to create a search facility which will allow users to find products according to price. I have created two drop down menus which will allow users to search between two values. I have assigned the variable name "lowstring" to the first drop menu and "highstring" to the second drop down menu. The two variables are being taken from the form successfully. I am not sure whether i have written the sql correctly or if I should have used a less than and greater than.
<%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("\n0253071\db\assignment1.mdb"))set rs = Server.CreateObject("ADODB.recordset")lowstring=Request.form("lower")highstring=Request.form("higher")rs.Open "SELECT * FROM Books WHERE Price BETWEEN '%" & highstring & "%' AND '%" & lowstring & "%' ORDER BY BookTitle",conn%>
Any help much appreciatedCheersCM
Can't get price search to work
in SQL
Posted
I'm trying to create a search facility which will allow users to find products according to price. I have created two drop down menus which will allow users to search between two values. I have assigned the variable name "lowstring" to the first drop menu and "highstring" to the second drop down menu. The two variables are being taken from the form successfully. I am not sure whether i have written the sql correctly or if I should have used a less than and greater than.
Any help much appreciatedCheersCM