Quick little snippet here for selecting IPs from a database based off a CIDR subnet. First off a table structure with some test data:
Select All Code:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mysql> desc tmp;
+——-+——————+
| Field Type
+——-+——————+
| ip1 [...]


