On Fri, 2008-08-22 at 17:16 -0400, tedd wrote: > At 12:35 PM -0400 8/22/08, Dan Joseph wrote: > > > tedd wrote: > > > > >> Why take them out in the first place? Keep the zip code as a string. After > > >> all, not all countries use just numbers. > > > > > >From a recent experience, you should all listen to Tedd's advice. I > >inhereited an application when I came to work at my current job where the > >developer used an INT(11) mysql column type for zipcodes. Its turned things > >into a nightmare. We pulll quotes based off distance and calculate that off > >zip codes. First I found that there are some 4 digit zip codes in other > >counties, and shipping from Ohio to New Jersey quotes were coming up as > >thousands of miles and thousands of dollars, when they shouldn't have. Then > >there was the announcement of expanding into Canada. Then came digging thru > >all the code trying to redo how zip codes are happening, and ultimately its > >lead to a rewrite of the system. > > > >Do yourself a favor, and use a string type, fix the ones you have with a > >sprintf() function and be glad you won't have to suffer in the future. > > > >-- > >-Dan Joseph > > Back-side I told the OP to convert to sting, add zeros to the left, > and left-trim as necessary. > > There is much more here than what meets the eye with international addresses. > > As a word of caution, don't make anything a number and also open > address forms to accept multiple strings for international > addressing. There's a big world out there of people who don't conform > to what we think is the "standard". Remember, if you speak/write > English then you're only 4 percent of the world's population. We're > hardly the "standard" for anything. > > Cheers, > > tedd > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > Not to mention, but of the two major English speaking countries, both America and England have different address standards. All too often an American site seems to think that a postcode is the same thing as a zip code, and then rejects it in a form for being in the wrong format! Ash www.ashleysheridan.co.uk