· 10 years ago · Sep 09, 2016, 10:02 AM
1CREATE TABLE IF NOT EXISTS `ip_city` (
2 `ip_from` int(10) unsigned NOT NULL,
3 `ip_to` int(10) unsigned NOT NULL,
4 `locid` int(10) NOT NULL
5) ENGINE=InnoDB DEFAULT CHARSET=utf8;
6
7ip_from BTREE ip_from
8ip_to BTREE ip_to
9ip_from_2 BTREE ip_from, ip_to
10
11SELECT * FROM `ip_city` WHERE (`ip_from` < 2995257412) AND (`ip_to` > 2995257412)