SQL statements - how do I construct them?

Development discussion about the hostip.info codebase, libraries, and database

Moderator: Moderators

SQL statements - how do I construct them?

Postby justindrerup on Mon May 16, 2005 11:32 am

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).
justindrerup
Expert
 

SQL statements and how do you construct them

Postby davemilne on Mon May 16, 2005 6:36 pm

I'd like to know the answer to that as well..
davemilne
Expert
 

Re: SQL statements and how do you construct them

Postby bfolkens on Wed May 18, 2005 1:26 pm

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
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am


Return to Hostip.info code/database devel

Who is online

Users browsing this forum: No registered users and 2 guests

cron