Britta,
You'll have to do some processing on PriceRange to turn it into:

(value > x) AND (value < y),

or into:
value BETWEEN x and y

You can't just plug "1 < 50" into it.  What does "1 < 50" mean, anyway?? ;-)

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-----Original Message-----
From: Britta Wingenroth (West Coast Web)


I have a database of products.  I need to submit a value ( a pricerange) to
the query that will return only the items in that range.

I have <cfparam name="pricerange" default="1 < 50">
which will be changed depending on what value is submitted by the user, (eg.
51-100).

The problem is that

SELECT ID, ProductName,  Price, Photo
FROM Products
WHERE (Price <50)

works, but

SELECT ID, ProductName,  Price, Photo
FROM Products
WHERE (Price = #pricerange#)

returns no records at all.



IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
https://secure.houseoffusion.com

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to