try this (reposted from my other answer, just in case you missed it):

SELECT TOP 1 product_min, product_price
FROM tblPricing
WHERE product_min >= 8
ORDER BY product_min, (product_min/8)

Azadi



On 06/05/2010 11:49, Mike Little wrote:
> william that would be ideal. my problem is that the client inputs their own 
> price breaks. most of their products require a minimum greater than 1.
>
> azadi, i have done the following and it still outputs some odd results (using 
> a cart qty of 4 to test)...
>
> SELECT FLOOR(product_price * CEILING(4 / product_min)) AS price
> FROM tblPricing
> WHERE 1=1
>
> (i am using mySQL by the way) 
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333381
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to