SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing International Postcodes Method

    Hello all,

    I'm wondering if I can borrow on the expertise in this forum with storing postcodes, as this is not something i've done before.

    Basically I want to store international post codes. If it was just Australia, I could just use int (4) because all postcodes meet this format. However i'm under the impression places like England have letters in their postcodes as well?

    So my current idea is to use varchar (10). Does anyone know of any international postcodes that would not fit into this column type?
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,347
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    varchar(25) will include portugal

    see http://en.wikipedia.org/wiki/Postal_codes
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    25 characters holy crap.... thanks, good thing I learnt this sooner rather than later! And I really gotta remember to type "wiki keyword" into firefox instead of google for things such as this, it is invariably more effective
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •