Hi every one I have written the bellow statement and when executed it returns no rows when a third condition is added e.g. the between statement.
If I take one the conditions out (this could be one of the = or the between) it returns rows form the database. The trouble is I need the retuned rows to be sorted by all three conditions not just the two = or an = and the between.
If anyone could help would be great!
Thanks edd
("SELECT MANUFACTURES.MANUFACTURES_NAME, PRODUCT.PRODUCT_ID, PRODUCT.PRODUCT_NAME, PRODUCT.PRODUCT_PICTURE, PRODUCT.PRODUCT_PRICE, PRODUCT.PRODUCT_STOCK FROM [SUBCATERGORY] INNER JOIN [PRODUCT] ON SUBCATERGORY.SUBCATERGORY_ID = PRODUCT.SUBCATERGORY_ID INNER JOIN [MANUFACTURES] ON PRODUCT.MANUFACTURES_ID = MANUFACTURES.MANUFACTURES_ID WHERE SUBCATERGORY.SUBCATERGORY_ID = '" & Replace(Request.QueryString("SubCatergory"), "'", "''") & " ' AND MANUFACTURES.MANUFACTURES_ID = '" & Replace(Request.QueryString("Manufcatures"), "'", "''") & " ' AND PRODUCT.PRODUCT_PRICE BETWEEN '" & Replace(Request.QueryString("Low"), "'", "''") & "' AND '" & Replace(Request.QueryString("High"), "'", "''") & " ' ORDER BY PRODUCT.PRODUCT_PRICE DESC", conn)
If I take one the conditions out (this could be one of the = or the between) it returns rows form the database. The trouble is I need the retuned rows to be sorted by all three conditions not just the two = or an = and the between.
If anyone could help would be great!
Thanks edd
("SELECT MANUFACTURES.MANUFACTURES_NAME, PRODUCT.PRODUCT_ID, PRODUCT.PRODUCT_NAME, PRODUCT.PRODUCT_PICTURE, PRODUCT.PRODUCT_PRICE, PRODUCT.PRODUCT_STOCK FROM [SUBCATERGORY] INNER JOIN [PRODUCT] ON SUBCATERGORY.SUBCATERGORY_ID = PRODUCT.SUBCATERGORY_ID INNER JOIN [MANUFACTURES] ON PRODUCT.MANUFACTURES_ID = MANUFACTURES.MANUFACTURES_ID WHERE SUBCATERGORY.SUBCATERGORY_ID = '" & Replace(Request.QueryString("SubCatergory"), "'", "''") & " ' AND MANUFACTURES.MANUFACTURES_ID = '" & Replace(Request.QueryString("Manufcatures"), "'", "''") & " ' AND PRODUCT.PRODUCT_PRICE BETWEEN '" & Replace(Request.QueryString("Low"), "'", "''") & "' AND '" & Replace(Request.QueryString("High"), "'", "''") & " ' ORDER BY PRODUCT.PRODUCT_PRICE DESC", conn)