Re: How to handle a "the"

From: Date: Wed, 05 Jul 2000 04:53:51 +0000
Subject: Re: How to handle a "the"
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-855@lists.php.net to get a copy of this message
At 12:20 AM -0400 7/5/00, Digital Hit Entertainment wrote:
Getting ready to do a table of film awards and I'm wondering what is the best way to handle the sorting of "The": is it possible/more efficient in the SQL select statement or in the PHP scripting? In other words, "The Green Mile" would come before "High Noon" because most folks alphabetize titles via what's after the "the".
The way I did it for one project, although it may have been a quick and dirty approach, was to have two fields in the database, one which had the title, and one which had the title minus A, An, and The. That way you can sort on one and display the other. You could write a PHP script that would populate the second field. Ed

« previous php.db (#855) next »