[For the spam-bot:  Go away, you annoying little beast.  You know I'm not 
posting spam so stop querying me about it and let's get back to the topic at 
hand; sql]

On Sunday 03 February 2002 1:27 pm, Chuck Barnett wrote:
> > Hi, I have a db field that holds the first and last name of a person.  Is
> > there a way to sort by the last name in that field?
> > The whole reason for this is to populate a select box sorted by last
> > name.
> >
> > I don't want to go back and create a separate field if I don't have to.

Your database is denormalised and this is what is causing the problem.  You 
could probably do this through string manipulation but it is almost always 
going to be a better idea to do this on the client side.  Additionally, 
consider that you may not be able to handle names like 'von Neuman' and the 
like.

---------------------------------------------------------------------
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