通过密钥的一部分来订购mysql请求 [英] ordering mysql request by part of a key

查看:54
本文介绍了通过密钥的一部分来订购mysql请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个狗窝数据库。一个页面按照kennel名称的字母顺序列出了狗舍



我有一个狗窝名称字段和一个带有狗窝名称的索引

唯一字段。


有些狗窝里面有The字样。作为

名称中的第一个单词,他们不希望按字母顺序列出The ...


有没有办法我可以请求mysql忽略The在订购它时,在

kennel名称中,或者我必须为

订购创建一个新字段,并删除The字样。来自该领域的狗窝名称?


bill

解决方案

bill写道:
< blockquote class =post_quotes>
我有一个狗窝数据库。一个页面按字母顺序列出狗舍

by kennel name。

我有一个狗窝名称字段和一个带有狗窝名称的索引作为唯一的

字段。


有些狗窝里面有The字样。作为名字中的第一个单词

并且他们不希望按字母顺序列出The ...


有没有办法我可以请求mysql忽略The在一个狗窝中

命名时,或者我必须为订购创建一个新字段,并且

删除The来自该领域的狗窝名称?


bill



comp.databases.mysql是一个更好的问题。这个问题。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Jerry Stuckle写道:


bill写道:


>我有一个狗舍数据库。一个页面按字母顺序列出狗窝名称。
我有一个狗窝名称字段和一个带有狗窝名称的索引作为
唯一字段。

一些狗舍有The字样。作为名称中的第一个单词
并且他们不希望按字母顺序列出...

有没有办法可以请求mysql忽略的"在订购时,请使用狗窝
名称,或者我必须为订购创建新字段
并删除The字样。来自该领域的狗窝名称?

账单



comp.databases.mysql可以更好地提出这个问题。



我的isp不提供此ng。


有人可以指向一个门户网站,允许我访问它吗?


账单




bill写道:


Jerry Stuckle写道:


bill写道:


我有一个狗窝数据库。一个页面按照kennel名称的字母顺序列出了狗舍



我有一个狗窝名称的字段和一个带有狗窝名称的索引仅为

字段。


有些狗窝里面有The字样。作为名字中的第一个单词

并且他们不希望按字母顺序列出The ...


有没有办法我可以请求mysql忽略The在一个狗窝中

命名时,或者我必须为订购创建一个新字段

并删除The字样。来自该领域的狗窝名称?


bill



comp.databases.mysql是一个更好的问题。这个问题。



我的isp不提供此ng。



我之前的回复似乎丢失了:

SELECT kennel FROM kennels ORDER BY REPLACE(kennel,''the '', '' '');


>

有人可以指向一个门户网站,允许我访问它吗?


bill


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

解决方案

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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


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.

can someone point me to a portal that will allow me to access it ?

bill



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'','''');

>
can someone point me to a portal that will allow me to access it ?

bill


这篇关于通过密钥的一部分来订购mysql请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆