[thelist] sql filtering problem

dn at dittodesign.co.uk dn at dittodesign.co.uk
Tue Aug 27 05:16:01 CDT 2002


Hi all,
Problems, problems, problems. *sigh*

Could one of you kind asp peeps take a look at this code.

I'm new to asp and struggling to get a simple filter to work.

Currently I land on the results page with this url
brand_product.asp?Product_Type=Microwave&Brand=aeg

and rather than show only microwaves by aeg it lists all microwaves in
the DB.

Where am I going wrong. Here's the code -

Sql is -
SELECT Brand_Logo, Brand_Logo_sml, ID, Product_Type, Brand, Model,
Reference_No, Colour, image, Retail_Price, Delivery_Charge
FROM kitchen_appliance
WHERE Brand = 'MMColParam' and Product_Type='MMColParamP'

Both MMColParam and MMColParamP
are defined at the top of the page -

<%
Dim RsProduct__MMColParam
RsProduct__MMColParam = "%"
if (Request.QueryString("Brand") <> "") then RsProduct__MMColParam =
Request.QueryString("Brand")
%>
<%
Dim RsProduct__MMColParamP
RsProduct__MMColParamP = "%"
if (Request.QueryString("Product_Type")  <> "") then RsProduct__MMColParamP
= Request.QueryString("Product_Type")
%>


In case you hadn't guessed I'm using Ultradev.
So keep it simple please =9-) nothing to technically verbose.

Darren Yates
dn at dittodesign.co.uk
http://dittodesign.co.uk





More information about the thelist mailing list