spacepoet Posted February 6, 2011 Share Posted February 6, 2011 Hello: I'm not sure where to ask this so I figured this is a good place. I have to build a zip code locator that will find businesses within a selected radius. Also, I need to create the admin side to add towns, and stores to the site. I don't want to buy any already existing system (unless it's one that is very similar to what I need to build - but I think it's pretty straightforward). Also, I purchased a zip code database, but it is in Access 2003 - is that easy to convert/import to a .sql / mySQL database? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/ Share on other sites More sharing options...
trq Posted February 6, 2011 Share Posted February 6, 2011 Also, I purchased a zip code database, but it is in Access 2003 - is that easy to convert/import to a .sql / mySQL database? That depends entirely on your skill level, I would say yes though. As for the rest of your post, do you have a question? Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170551 Share on other sites More sharing options...
spacepoet Posted February 6, 2011 Author Share Posted February 6, 2011 Hi: I wanted to know if there is a tutorial section on here, or if someone knows of a tutorial that will explain how to make a Zip Code Locator like the one I need. My GOOGLE searches keep bringing up systems for sale, and I want to make one from scratch. Any ideas? Thanks. PS - Access 2 mySQL: Is this merely exporting as a .CSV file, and importing to mySQL? I'm basically trying to figure out the best way to take it out of Access and add it to an already existing mySQL database. Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170557 Share on other sites More sharing options...
spacepoet Posted February 6, 2011 Author Share Posted February 6, 2011 OK, I think I found a tutorial for the Zip Locator itself: http://htmlcampus.com/build-a-zip-code-store-locator-application-in-php/ However, there is an error on the demo of it, so let me try it on my server and see. But, can you clarify the Access to mySQL ?? Also, I think I will need some points on how to make the admin part, but let me do this one step at a time. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170559 Share on other sites More sharing options...
icez Posted February 6, 2011 Share Posted February 6, 2011 for your access 2003 to mysql... you should try this : http://tinyurl.com/4l483xw Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170561 Share on other sites More sharing options...
spacepoet Posted February 6, 2011 Author Share Posted February 6, 2011 Ha! Ok, this just made me remember when I bought the zip database, it came with a few different versions - one of them is ZipCodes.csv - so I believe I can now just import it into my mySQL database. Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170562 Share on other sites More sharing options...
fortnox007 Posted February 6, 2011 Share Posted February 6, 2011 indeed Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170578 Share on other sites More sharing options...
spacepoet Posted February 6, 2011 Author Share Posted February 6, 2011 OK, I'm am stuck on this. I have my Access Zipcode database exported as a .TXT file. The data looks like this: "00501",40.92,-72.63,"HOLTSVILLE","NEW YORK","NY" "00544",40.92,-72.63,"HOLTSVILLE","NEW YORK","NY" "00601",18.16,-66.72,"ADJUNTAS","PUERTO RICO","PR" "00602",18.39,-67.18,"AGUADA","PUERTO RICO","PR" "00603",18.45,-67.14,"AGUADILLA","PUERTO RICO","PR" Etc... I want to imported it into my mySQL database. I'm trying to use this code: CREATE TABLE `zip_codes` ( `zip_id` INT(11) NOT NULL AUTO_INCREMENT, `zip` VARCHAR(5) NOT NULL DEFAULT '', `lat` VARCHAR(10) NOT NULL DEFAULT '', `lon` VARCHAR(10) NOT NULL DEFAULT '', `city` VARCHAR(50) DEFAULT NULL, `full_state` VARCHAR(50) DEFAULT NULL, `abbr_state` char(2) NOT NULL DEFAULT '', PRIMARY KEY (`zip_id`), UNIQUE KEY `zip` (`zip`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; It's from a test database that has some zipcodes in it (but it's not full): CREATE TABLE `zip_codes` ( `zip_id` INT(11) NOT NULL AUTO_INCREMENT, `zip` VARCHAR(5) NOT NULL DEFAULT '', `lat` VARCHAR(10) NOT NULL DEFAULT '', `lon` VARCHAR(10) NOT NULL DEFAULT '', `city` VARCHAR(50) DEFAULT NULL, `full_state` VARCHAR(50) DEFAULT NULL, `abbr_state` char(2) NOT NULL DEFAULT '', PRIMARY KEY (`zip_id`), UNIQUE KEY `zip` (`zip`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `zip_codes` (`zip`, `abbr_state`, `lat`, `lon`, `city`, `full_state`) VALUES ('35004', 'AL', '33.606379', '-86.50249', 'Moody', 'Alabama'); INSERT INTO `zip_codes` (`zip`, `abbr_state`, `lat`, `lon`, `city`, `full_state`) VALUES ('35005', 'AL', '33.592585', '-86.95969', 'Adamsville', 'Alabama'); INSERT INTO `zip_codes` (`zip`, `abbr_state`, `lat`, `lon`, `city`, `full_state`) VALUES ('35006', 'AL', '33.451714', '-87.23957', 'Adger', 'Alabama'); INSERT INTO `zip_codes` (`zip`, `abbr_state`, `lat`, `lon`, `city`, `full_state`) VALUES ('35007', 'AL', '33.232422', '-86.80871', 'Alabaster', 'Alabama'); Etc... How do I import and create the "zip_codes" table? Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1170802 Share on other sites More sharing options...
spacepoet Posted February 7, 2011 Author Share Posted February 7, 2011 OK, I have this resolved. I found a FreeWare MS Access to mySQL converter, if it will help anyone else who had this issue: http://www.brothersoft.com/access-to-mysql-download-82991.html Very easy to use and it worked just fine! Quote Link to comment https://forums.phpfreaks.com/topic/226855-not-sure-where-to-ask-this-but-php-zip-code-locator/#findComment-1171046 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.