tag:blogger.com,1999:blog-1135944569112521190.post2286463780399914330..comments2024-03-28T08:20:49.787+01:00Comments on Daniël's Database Blog: Working with IP's in MySQL and MariaDBDaniël van Eedenhttp://www.blogger.com/profile/14757324605223498151noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-1135944569112521190.post-47096852429618848712015-11-06T13:25:51.296+01:002015-11-06T13:25:51.296+01:00Really nice!
I have one question... For example w...Really nice!<br /><br />I have one question... For example when I have a table with lots of networks (and each having differrent netmask etc.)... How would a query look like when I want to find all networks containing a given IP ordered by netmask?<br /><br />Example:<br />Networks:<br />10.0.0.0 / 8<br />10.0.2.0 / 24<br />10.10.0.0 / 16<br /><br />And now I want to find the networks matching my IPs.<br />when searching for 10.10.5.100 I want to get 10.10.0.0 / 16<br />when searching for 10.0.2.100 I want to get 10.0.2.0 / 24<br />when searching for 10.0.5.100 I want to get 10.0.0.0 / 8<br /><br />How would that work?<br /><br />Kind regards<br />MartinAnonymoushttps://www.blogger.com/profile/17231678558406960322noreply@blogger.com