Created
September 19, 2012 02:18
-
-
Save ss23/3747260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> select location.country from location, blocks where startIpNum < 2071690107 AND endIpNum > 2071690107 and blocks.locId = location.locId\G | |
*************************** 1. row *************************** | |
country: CN | |
1 row in set (0.87 sec) |
mysql> select cc.cn from cc, ip where ip.start < 2071690107 AND ip.end > 2071690107 and ip.ci = cc.ci;
+-------+
| cn |
+-------+
| China |
+-------+
1 row in set (0.01 sec)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mysql> select Location.country from Location, Blocks where startIpNum < 2071690107 AND endIpNum > 2071690107 and Blocks.locId = Location.locId
-> ;
+---------+
| country |
+---------+
| CN |
+---------+
1 row in set (0.59 sec)