Webmaster Web Tools
Easy to Use Web Tools
Visit Trackers, Web Polls, Slideshows
RSS Tickers, Podcasts and more.
www.webpasties.com

Back to WebPasties
Back to Step #1 to Step #4

Step #5 - Creating the ZIP code database

This tutorial refers to a MySQL table named zipcodes. The easiest way to create the zipcodes table in our MySQL database is to execute a prepackaged SQL query. If you have PhpMyAdmin installed, you can simply navigate to your database of choice and then eqecute the SQL query below. A zipcodes table will created in your database.

The data for our ZIP code database is in a Comma Separated Value (CSV) file format. The best way to add the data in this file to our table is to run PhpMyAdmin and perform the following steps.

  1. Select the zipcodes table in PhpMyAdmin to bring up its corresponding page.
  2. Scroll to the bottom of the zipcodes table page and look for a link that says "Insert data from a textfile into table".
  3. Click on the "Insert data from a textfile into table" link .
  4. Complete the properties for the text file. It's fields are terminated by ',' and the LOAD method should be "DATA LOCAL". Once filled out, the form should look similar to the image below:

  5. PhpMyAdmin Graphic
  6. Click the "Submit" button

Step #5 SQL Query and Data


To Step #6 - Querying the ZIP Code Database