This is going to be one of those issues that will have me creating a head shaped dent on table in front of me, but I was driven out of my apartment by construction this morning and haven't had sufficient coffee.
What's the most efficient way to create a string into a library sorted version? That is dropping any "An ", "A " or "The " e.g. "The Godfather" becomes "Godfather".
In mysql I do the following:
SELECT apnumber, aptitle, IF( aptitle LIKE 'The %', SUBSTRING( aptitle, 5 ) , IF( aptitle LIKE 'A %', SUBSTRING( aptitle, 3 ) , IF( aptitle LIKE 'An %', SUBSTRING( aptitle, 4 ) , aptitle ) ) ) AS sorttitle etc...
I'd like to be able to handle this before mysql but my coffee/sleep deprived brain is making this too hard! :)