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
|