...

View Full Version : Getting A Price Range



Pee-H-Pee
10-22-2004, 12:30 AM
I am trying to get a price range so my visitors can view my products within a certain price.

For example:

Click here for products $10 - $25
and so on...

Here is what I have so far but it doesn't seem to be doing the trick:



select * from products WHERE Price = '10.00' || Price <= '25.00'

raf
10-22-2004, 12:39 AM
select var1, var2 from products WHERE Price BETWEEN 10 and 25

--> never use a * in embedded sql (always specifythe columns)
--> price should be an indexed, numerical column to speed up the searches

Pee-H-Pee
10-22-2004, 02:13 AM
Thank you for the help :)

raf
10-22-2004, 08:30 AM
You're welcome :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum