I have a database with Country-IP addresses.
My table has two fields.
LBound, tinyint
UBound, tinyint
When I query the table like this:
select * from allowed where '129.250.224.1' BETWEEN lbound AND ubound
I get 3 results:
12.205.104.0 13.16.137.9
129.250.2.43 129.250.3.137
129.250.16.47 129.253.255.255
But I only want to return:
129.250.16.47 129.253.255.255
Is this a data type issue? If so, what datatype should I be using?