View Full Version : Getting A Price Range

10-21-2004, 11:30 PM
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'

10-21-2004, 11:39 PM
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

10-22-2004, 01:13 AM
Thank you for the help :)

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