Page 1 of 1

SQL statements - how do I construct them?

PostPosted: Mon May 16, 2005 11:32 am
by justindrerup
Is there any documentation on what the SQL statements should look like?

I can't find the README that is discussed at the bottom of this page - http://www.hostip.info/dl/index.html

I ultimately want to use this data in a Microsoft SQL Database and have successfully imported the tables across however I'm unsure how I actually query the data to get a response (even for MySql).

SQL statements and how do you construct them

PostPosted: Mon May 16, 2005 6:36 pm
by davemilne
I'd like to know the answer to that as well..

Re: SQL statements and how do you construct them

PostPosted: Wed May 18, 2005 1:26 pm
by bfolkens
davemilne wrote:I'd like to know the answer to that as well..


If you use the ip4_* tables, you can lookup an ip address and map to a location by something like this:

ip = 216.177.121.11

SELECT * FROM ip4_216 WHERE b=177 AND c=121

you can also join this with city, cityByCountry or countries on the "city" or "country" columns