You may be able to sort using a regex expression.

David

-----Original Message-----
From: DL Neil [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 13, 2002 1:39 AM
To: 'abdul - عبد الرحمن' <[EMAIL PROTECTED]; [EMAIL PROTECTED]>
Subject: Re: ignoring in ORDER

Hi Abdul,

Can Mysql  ignore alphabet , like  'the'  when
ORDERING a name.

A sample :

I have a table (first_name) :

- The test.
- Falcon
- The Armageddon
- Battle


When ordering it will be :

Battle
Falcon
The Armageddon
The test.

Can it be like this :

The Armageddon
Battle
Falcon
The test.

Is that possible?


=Anything is possible!

=This is a common 'problem' in the library world where in the context of
titles 'the', 'a', 'al' are considered
'noise-words'. Some of the 'library' scripts available on the various
support/tutorial sites may offer
assistance.

=Here are three choices:
1 regimentation: insist that all title data entered, is expressed in a
sequence-friendly fashion, eg
"Armageddon, The";
2 smart data: have two title fields in your db. One which is the title
straight off the cover. The other which
is a 'sequencing field' - sometimes with noise words removed/words
re-ordered, sometimes exactly the same. Users
should be presented with the former, but the RDBMS is programmed to
use/sequence using the latter;
3 smart queries: (this is more of a challenge) look up IF() [6.3
Functions for Use in SELECT and WHERE Clauses]
and rewrite the query so that if the title commences with a noise word
miss it out of the sort process, eg if
the left three characters are "the" sequence using only the
"Arrmageddon" part.

=Regards,
=dn



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to