You are here: Re: UK postal code fields « PHP Language « IT news, forums, messages
Re: UK postal code fields

Posted by murfitUK on 05/19/07 10:56

I found this that might be helpful. There is a zip with a few files that
you may be able to inspect and there are links to the official postcode
standards.

http://www.braemoor.co.uk/software/postcodes.shtml

Might be worth a look.



<leader@congress.hotmail.com> wrote in message
news:l2us43pv9fn8ppr9icnjt022q6474quvfg@4ax.com...
> On Fri, 18 May 2007 18:04:25 GMT, "cluthz" <WHATEEVVEERR@by.co.uk>
> wrote:
>
>>Hi there,
>>
>>I have a php / mysql application where I have to change the mysql postcode
>>field from being one field to two fields (for the first page and second
>>part
>>of the post code).
>>
>>In the database abuot 80% of fields have been entered in a good format
>>having a space between the two sections.
>>
>>I'm going to write a script that will search for this space and divide all
>>existing postcodes at the the point where this space occurs. Where there
>>is
>>no space in a postcode field. I'm just going to cut the postcode at the
>>fourth character. Therefore anything past the fourth character will go
>>into
>>the second part of the field.
>>
>>I thought before i go implementing this. Maybe someone has done it
>>already,
>>or even knows of a webservice or something that exists that will do it
>>with
>>better accuracy then I can.
>>
>>A list of all valid postcodes (first part) would be useful for example as
>>I
>>could compare each postcode to this list.
>>
>>Any suggestions most welcome.
>>
>>Thanks in advance
>>
>
> One of the gurus around here, some months ago, turned out to be an
> expert in all this; your hope must be he reads your post (and mine!).
>
> I'm having my own problems with the UK postcodes at present and might
> add a couple of pointers -
> 1 - keep in mind that some (Central London only) postcodes can stretch
> to, say, SW1A 1AA, and -
> 2 - some cities (Birmingham, Glasgow, Manchester, Liverpool,
> Sheffield) have just the one starting letter (which can mess up your
> sorts - G1 1AA, G41 1AA, etc).
>
> As for your list, go see -
> http://www.postcode-ads.co.uk/s/index.htm
>
> Presumably the splitting is a prelude to sorts of all kinds. Unless
> you stick a [space] before any single-digit area (e.g. convert G1 1AA
> to G 1 1AA) you'll have more problems. I suggest you might avoid
> problems in the future by manipulating any new input, adding spaces
> appropriately.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация