You are here: Re: ordering mysql request by part of a key « PHP Programming Language « IT news, forums, messages
Re: ordering mysql request by part of a key

Posted by bill on 12/30/06 21:27

strawberry wrote:
> bill wrote:
>> Jerry Stuckle wrote:
>>> bill wrote:
>>>> I have a database of kennels. One page lists the kennels
>>>> alphabetically by kennel name.
>>>> I have a field for kennel name and an index with kennel name as the
>>>> only field.
>>>>
>>>> Some of the kennels have the word "The" as the first word in the name
>>>> and they do not want to be listed alphabetically by "The..."
>>>>
>>>> Is there a way that I can request that mysql ignore "The" in a kennel
>>>> name when ordering it or must I create a new field for the ordering
>>>> and remove the "The" from the kennel name for that field ?
>>>>
>>>> bill
>>> comp.databases.mysql would be a much better place to ask this question.
>>>
>> my isp does not supply this ng.
>
> My earlier reply seems to have got lost:
>
> SELECT kennel FROM kennels ORDER BY REPLACE(kennel,'the ','');

well, that is easy enough.
Many thanks.

bill

 

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

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