PDA

View Full Version : SQL Question



Ben Smith
May 28th, 2007, 01:15 PM
You know in iTunes, where the artists are ordered alphabetically and any artists with 'The' at the front of them are ordered by the actual noun in the name, is this possible in SQL?

Or would I have to do it manually in PHP.

For example:

Asian Kung-Fu Generation
The Ataris
Athlete

Thanks,
Ben

blazes
May 28th, 2007, 02:34 PM
Blazes beleives that it may be possible, but it'd be 4.7 trillion times easier to do it with php. Also, it'd probably be about Pi times faster.

Ben Smith
May 28th, 2007, 04:01 PM
Ben says:
Cheers! I'll do that.
I had a thought that for entering into the database, I could add '[the]' in brackets after the name, so they'll fit alphabetically and then just do an str_replace to take it out and slot it in the front.

Excellent.