Compare range of ip addresses with start and end ip address in MySQL
- by Maarten
I have a MySQL table where I store IP ranges. It is setup in the way that I have the start address stored as a long, and the end address (and an id and some other data).
Now I have users adding ranges by inputting a start and end ip address, and I would like to check if the new range is not already (partially) in the database.
I know I can do a…