View Single Post
  #1 (permalink)  
Old 08-01-2005, 06:32 PM
richkoi's Avatar
richkoi richkoi is offline
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Atlanta, GA
Posts: 488
richkoi RepRank 0
Default Searching within a range - mySQL php

I set up a database to have a searchable range of numbers. I have table set up that has an X column and a Y column. The X equals the low side of the range and the Y the high side.

How do I create a mySQL query that will search for one number within that range?

For example:

ITEM = Item 1
X = 3
Y = 5

ITEM = Item 2
X = 2
Y = 3

Search Variable = 4

Results: Item 1

Let me know if this is unclear. Thanks,

Rich
__________________
Me
Reply With Quote