Jump to content

mann95

Members
  • Posts

    2
  • Joined

  • Last visited

mann95's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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
  2. 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
×
×
  • Create New...