I assume session.total is a numeric value; try getting rid of the quotes.

-----Original Message-----
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:01 PM
To: CF-Talk
Subject: Query Help!!


Does anyone see any problems with the following query:

<cfquery name="get_shipratedollars" datasource="#config.datasource#">
Select shiprate from shipratesdollars
WHERE '#session.total#' >= shipfrom
and '#session.total#' <= shipto
</cfquery>


I can not figure out why I am getting incorrect results.  Sometimes it will
pull more than one record and sometimes it will pull the max record only.
Here is a copy of the table I am using named shipratedollars.

ID      shiprate        shipfrom             shipto
1       4.00             0.00         50.00
2       6.00            50.01        100.00
3       8.00           100.01        200.00
4       12.00          200.01        300.00
5       18.00          300.01        500.00
6       25.00          500.01        750.00
7       40.00          750.01       1000.00
8       50.00         1000.01       1500.00
9       70.00         1500.01       2000.00
10      100.00  2000.00        99999.00


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

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

Reply via email to