You are here: How to ignore second letter in first part of UK postcodes? « PHP Language « IT news, forums, messages
How to ignore second letter in first part of UK postcodes?

Posted by leader on 05/19/07 04:40

I've inherited a php/mysql app which sorts and displays UK postcodes.
When sorting, it uses
SELECT... WHERE postcode like "$postcode%"
and for a $postcode of, say E, this works Ok except it brings to
screen everything starting EH (for Edinburgh) *and* everything
starting E (for East London). I need to refine this further. How do
I bring to screen *only* those starting, say, E (for East London), S
for Sheffield and G for Glasgow, etc?
I think I need to be able to ignore any postcode whose second letter
is *not* a letter but is a number or space, or blank, but I don't know
how to do this.

Any help gratefully received.

 

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

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