Skip to content

Instantly share code, notes, and snippets.

@ss23
Created September 19, 2012 02:18
Show Gist options
  • Save ss23/3747260 to your computer and use it in GitHub Desktop.
Save ss23/3747260 to your computer and use it in GitHub Desktop.
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)
@Timdawson264
Copy link

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)

@gizmoguy
Copy link

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