473,498 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ordering mysql request by part of a key

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
Dec 30 '06 #1
10 1454
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
==================
Dec 30 '06 #2
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
Dec 30 '06 #3

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
Dec 30 '06 #4

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
Dec 30 '06 #5
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.

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

bill
1. Ask your ISP to carry it. I've found most are quite amiable to
adding groups at user's requests.

2. Google Groups (if you really must).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Dec 30 '06 #6
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
Dec 30 '06 #7
Jerry Stuckle 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.

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

bill

1. Ask your ISP to carry it. I've found most are quite amiable to
adding groups at user's requests.
been there, done that, no response to my request. (but it has
only been 7 days, so far :-\
>
2. Google Groups (if you really must).
Only if the wonderful people on this ng can't help.
bill

Dec 30 '06 #8
bill wrote:
Jerry Stuckle 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.

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

bill


1. Ask your ISP to carry it. I've found most are quite amiable to
adding groups at user's requests.


been there, done that, no response to my request. (but it has only been
7 days, so far :-\
>>
2. Google Groups (if you really must).


Only if the wonderful people on this ng can't help.
bill
The point is - this is not a mysql newsgroup. You should take your
questions to the appropriate newsgroup. That's why comp.databases.mysql
was created.

And I would suggest you ask your isp again. It might have gotten lost
during the holidays.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Dec 30 '06 #9
Jerry Stuckle wrote:
....
The point is - this is not a mysql newsgroup. You should take your
questions to the appropriate newsgroup. That's why comp.databases.mysql
was created.

And I would suggest you ask your isp again. It might have gotten lost
during the holidays.

Please allow me to cordially disagree with you.
Having been to the mysql reference website I find that while the
information is there, it is almost all oriented towards command
line usage, not from within PHP.

bill
Dec 31 '06 #10
On Sun, 31 Dec 2006 10:24:37 -0500, bill <no****@spamcop.netwrote:
>Jerry Stuckle wrote:
...
>The point is - this is not a mysql newsgroup. You should take your
questions to the appropriate newsgroup. That's why comp.databases.mysql
was created.

And I would suggest you ask your isp again. It might have gotten lost
during the holidays.

Please allow me to cordially disagree with you.
Having been to the mysql reference website I find that while the
information is there, it is almost all oriented towards command
line usage, not from within PHP.
The questions you've asked have both been about SQL which MySQL runs, not PHP.
Since the answer is the same whether you send the SQL from a command line or
from any other language then they aren't really on topic here in a PHP group.

This was one reason why comp.databases.mysql was created; here is a quote from
the original rationale when the group was proposed:

"There is no dedicated newsgroup for MySQL in the comp.* hierarchy and, as a
result, most of the discussions of MySQL take place in the comp.lang.php
newsgroup. This is unsatisfactory because MySQL is not in any intrinsic way
related to the PHP language, and users of MySQL who do not use it in
conjunction with PHP front ends are unlikely to know to look for discussions
of MySQL there. In addition, discussion of issues related to MySQL but not
to PHP are off-topic for comp.lang.php. A new group specifically for MySQL
would offer a place where all users of MySQL could participate without
risking being off-topic for the group and where all users of MySQL could
easily discover the group."

The charter for comp.lang.php contains:

"A group alt.php.sql also currently exists, but is less frequently used than
alt.php. Since database connectivity is a large part of PHP, it will be
considered topical in comp.lang.php. A comp.lang.php.sql is not deemed
necessary at the current point in time, however may be proposed at a later
point should the need arise. "

... but it only mentions database _connectivity_, so that's questions on how
to get connected to the database, including setting up the extensions, and how
to use the PHP side of the APIs to get your data in and out of PHP data
structures - but that doesn't cover how to use the database you're connected
to.

Since comp.databases.mysql is in one of the "Big-8" hierarchies (the older,
more official ones as opposed to the alt.* groups) then your ISP really should
add it, arguably it should have done it automatically ages ago. ISPs are
generally pretty useless though when it comes to Usenet. news.individual.net is
a cheap way of getting access to a good Usenet server if your ISP isn't up to
the job.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Dec 31 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1683
by: Matt Fletcher | last post by:
Hi guys, I am trying to allow the models in a mysql database to be ordered by the site owner. I was thinking along the lines of a <SELECT> list containing the model names and Up and Down...
8
5250
by: Bill Eldridge | last post by:
I'm trying to grab a document off the Web and toss it into a MySQL database, but I keep running into the various encoding problems with Unicode (that aren't a problem for me with GB2312, BIG 5,...
15
4563
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
2
3419
by: Roopesh | last post by:
Hi, In my mod_python project I am using mysql as the database. There is table card in which unique cards are stored. When a user request comes he has to get a unique card. In this situation I want...
2
9140
ak1dnar
by: ak1dnar | last post by:
Please take a look at for this jsp coding. here i can successfully insert the client details to the table. Only after inserting successfully i need to run another query.This will get the userID from...
1
146
by: CBFalconer | last post by:
kooladi wrote: Yes. The first module that satisfies a function load request will normally resolve that function forever. This sequence is normally needed to make libraries flexible, but is not...
9
2040
by: chromis | last post by:
Hi, I've never coded in ASP before and I'm trying to port a couple of simple PHP files to ASP.NET. The first file addScores.php takes form data and a hash and inserts the data into the db, it...
3
2277
by: Jeff | last post by:
I know how to use php/mysql, but the html aspect of what Im trying to do (if its even possible this way) is what Im unsure of. I want to have a button that a user can hit to valid mysql info...
4
2279
by: janetopps | last post by:
I have an asp website, and i was using an MS Acess database, and i had to move to MySQL. I'm using a database converter, and some of the data shows, and other pulls up errors which im trying to...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.