Re: [sqlite] ip2long

2006-12-08 Thread Daniel Önnerby
I havn't followed the whole thread, but from what I understand you store the data as numbers and not IP-strings. The most common way of checking a range is to use a IP-mask, and this should work fine in this case as well. Something like: SELECT * FROM myiptable WHERE (ip & "maskvalue") == ("subn

Re: [sqlite] ip2long

2006-12-04 Thread Jim Dodgen
I would break each octet into separate fields then compare octet by octet Kevin Waterson wrote: How can I SELECT an IP within a range? All my IP's are stored as 1.2.3.4 but I need to check if each is within a range of long IP's. Can this be done with SQLite? or do I need some sort of external i

[sqlite] ip2long

2006-12-04 Thread Kevin Waterson
How can I SELECT an IP within a range? All my IP's are stored as 1.2.3.4 but I need to check if each is within a range of long IP's. Can this be done with SQLite? or do I need some sort of external ip2long() function to throw at it? Kind regards kevin -- "Democracy is two wolves and a lamb voti