Page 1 of 1

Cities with 0 (zero)

PostPosted: Fri May 20, 2005 10:59 pm
by soachs
The Problem: Seems many, MANY, "city" fields in the database have a 0 (zero), thus I can't get it to return a result for many of the IP's I enter, however when I enter the IP on this site it works. I believe my script is working right because it is working for some IP's (resolving to a city/state). Here's an example:

Example IP (real): 68.6.129.178

My Query: SELECT city, country FROM ip4_68 WHERE b = '6' && c = '129'

Result: city: 0 - country: 226

Next Query: SELECT name FROM cityByCountry WHERE city = '0' && country = '226'

(Obviously if "city" is 0 there is no chance I will get a result back.)

Any thoughts? :?: :?: :?:

Re: Cities with 0 (zero)

PostPosted: Sun May 22, 2005 10:41 am
by bfolkens
soachs wrote:The Problem: Seems many, MANY, "city" fields in the database have a 0 (zero), thus I can't get it to return a result for many of the IP's I enter, however when I enter the IP on this site it works. I believe my script is working right because it is working for some IP's (resolving to a city/state). Here's an example:

Example IP (real): 68.6.129.178

My Query: SELECT city, country FROM ip4_68 WHERE b = '6' && c = '129'

Result: city: 0 - country: 226

Next Query: SELECT name FROM cityByCountry WHERE city = '0' && country = '226'

(Obviously if "city" is 0 there is no chance I will get a result back.)

Any thoughts? :?: :?: :?:


Replied to your email about this directly - should've checked the forum first I guess ;)

In any case - there are still quite a few IPs w/out city information (this improves every day though) - but for now, do a left join if doing a query, or check for the 0 first. The country is valid, but for those with city=0 we haven't gotten down to city resolution yet.

Help plz

PostPosted: Sun Nov 27, 2005 10:04 am
by Guest
[quote="bfolkens"][/quote]

Does any one know what is wrong here?




900pay online casinos fun Online Casinos