0

I have database table alike

id   ipfrom    ito        country     code
1    1.0.0.0   1.0.0.255  Australia   AU
2    1.0.1.0   1.0.3.255  China       CN

I have multiple rows in table around 12500 data.

I need sql query to get the row if user ip in between ipfrom and ipto of any row.

Example:

If i request for ip - 1.0.0.1 then it must return first row as shown in above table.

Updated:

I am using mysql

jarlh
  • 42,561
  • 8
  • 45
  • 63

0 Answers0