use BETWEEN 
or try
> lowprice AND < hiprice
"Britta Wingenroth \(West Coast Web\)" <[EMAIL PROTECTED]> wrote:
This is a multi-part message in MIME format.

------=_NextPart_000_0011_01C052F4.83798150
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3D"pricerange" default=3D"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 I can't get a range instead of a fixed number to work:

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


Thank you for any help!

britta





------=_NextPart_000_0011_01C052F4.83798150
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3017.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have a database of products.� I =
need to=20
submit a value ( a pricerange) to<BR>the query that will return only the =
items=20
in that range.<BR><BR>I have <cfparam name=3D"pricerange" =
default=3D"1 <=20
50"><BR>which will be changed depending on what value is submitted by =
the=20
user, (eg.<BR>51-100).<BR><BR>The problem is that<BR><BR>SELECT ID,=20
ProductName,� Price, Photo<BR>FROM Products<BR>WHERE (Price=20
<50)<BR><BR>works, but I can't get�a range instead of a fixed =
number to=20
work:<BR><BR>SELECT ID, ProductName,� Price, Photo<BR>FROM=20
Products<BR>WHERE (Price =3D #pricerange#)<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thank you for any=20
help!<BR><BR>britta<BR><BR><BR><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0011_01C052F4.83798150--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts

Reply via email to