Query an existing number range |
![]() ![]() |
Query an existing number range |
Nov 6 2009, 08:01 PM
Post
#1
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 7,881 Joined: 23-November 08 Member No.: 6,521 |
This is kinda hard to explain, but here goes....
I have a db table called "number_range" with 2 columns: `start`,`end` I have a number inside both of these columns: start|end 45000 | 45999 34000 | 34999 12300 | 12355 55710 | 55788 I have a variable: $number = ?, which I need to see if there is a range it belongs to. Or if a range exists. Each record is a number range. I have thousands of these. I was thinking about actually entering the number range, into 1 column, which would increase my record count quite abit. Not a problem, but I thought I'd ask if anyone knows a way to take my first number ($number) and see if there is a record that ($number) belongs to. Or if someone can imagine a better way around this. Just diggin for ideas. thanks guys! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 12:12 PM |