[thelist] sql filtering problem

Rich Gray richardgray at onetel.co.uk
Tue Aug 27 07:21:00 CDT 2002


Hi Darren
What does the exact SQL string look like when the script runs? i.e. what
does <% Response.Write(SQLString) %> display?
Rich
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of dn at dittodesign.co.uk
Sent: 27 August 2002 11:16
To: thelist at lists.evolt.org
Subject: [thelist] sql filtering problem


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


--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list