I’m looking for a countries/cities (all over the world) MySQL dump.
Like they use in http://www.datingplace.com/servlet/NewRegistration
I’ve searched for days, but cannot find it, who can help me (and many others) ??
I’m looking for a countries/cities (all over the world) MySQL dump.
Like they use in http://www.datingplace.com/servlet/NewRegistration
I’ve searched for days, but cannot find it, who can help me (and many others) ??
This can be a good start…
[font=Arial][color=#000000]http://www34.brinkster.com/natalinos/db/paises.mdb[/color][/font]
This is a database we (a big bunch of hispanic coders from forosdelweb.com) made a few months ago.
It includes 18 countries with COUNTRY/STATE/CITY structure, including Argentina, Colombia, Mexico, Brazil, US, Canada, and 12 more from Latin America.
I got a MySQL database with every country in the world. No cities, though. Let me know if you want it still.
Toly, if possible, can you hook me up?
Well, I knew I had something somewhere…
I found in one backup CD a CSV file with almost 7000 cities from 232 countries. I’m not saying I made it, but I don’t remember where I got it…
Enjoy!!
Actually those are states, not cities in most cases
Where the H… is my attachment, does anybody see it?
it has to be validated first by the mods
Oh, I should imagine…
Hey! look, I’m a Zealot now!!
Sure… http://www.tolysivik.com/countries.sql
They are in english and spanish, but you can just delete the spanish column.
Cheers man, you rock.
Apparantly I’m not the only one searching for this database. I already have the countries, that’s not a problem, but I want a complete database, like (as said on startpost):
http://www.datingplace.com/servlet/NewRegistration
Hey brain,
Just wait for my attachment to validate. It has a CVS with what you need.
manoloweb >> I can’t wait !!!
Finally there it is
Where ??
See post #5 in this thread
Super !!! thanx
Does anyone have a good trick how to convert to MySQL??
You’ll have to edit it to suit your server etc. but this should be a starting point for you
<?php
//-- Put your code to open a DB connection here
//-- make sure the cities.csv file is in the same directory as this script
$listing = file("cities.csv", "r");
foreach ($listing as $line){
$parts = explode(";", $line);
//-- This makes the SQL in the form of
/* INSERT INTO `cities` ('Caracas', 've', '.Venezuela '); */
$sql = "INSERT INTO `cities` ('$parts[2]', '$parts[3]', '$parts[4]')"
//-- Run the query
mysql_query($sql);
//-- Echo some stuff to tell you what's going on
echo 'Writing : '.$sql.'<br />';
}
?>
Check http://dataservices.assemblysys.com. The main cities database contains more than 1,800,000 from around the world, but if you want only cities in some countries or in some US states, you can ask for a customized db.
Hope that helps.
Mike