Storing Records Alphabetically

2002-07-25 Thread Mark Gowdy

Hi

I am storing a list of titles on a mysql db.  Some of the records start
with 'The','A' or 'An'.  I would like to be able to enter the title in
the form 'The Count .' instead of 'Count ..., The' and have the
record stored as 'Count ' but displayed as 'The Count ...' when I
display it.  Is there any easy way to do this when doing the INSERT or
SELECT statements?

Any ideas would be gratefully received.

Thanks

Mark

-
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




Re: Storing Records Alphabetically

2002-07-25 Thread Benjamin Pflugmann

Hi.

On Thu 2002-07-25 at 11:24:36 -0400, [EMAIL PROTECTED] wrote:
 Hi
 
 I am storing a list of titles on a mysql db.  Some of the records start
 with 'The','A' or 'An'.  I would like to be able to enter the title in
 the form 'The Count .' instead of 'Count ..., The' and have the
 record stored as 'Count ' but displayed as 'The Count ...' when I
 display it.  Is there any easy way to do this when doing the INSERT or
 SELECT statements?
 
 Any ideas would be gratefully received.

IMHO, the usual solution to this is to have a seperate column
(e.g. sort) for sorting, i.e. a column containing only count ...
which will be used in the ORDER BY clause:

SELECT title FROM whatever WHERE [...] ORDER BY sort


I do not think that there is an easy way, because there is no easy
way to know what is special (in my experience there is more than A,
An and The to be considered).

Greetings,

Benjamin.

-- 
[EMAIL PROTECTED]

-
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