It could be done with MySQL itself by either adding a sort_title field
that you make those changes to, by selecting the data into a temporary
table then performing the appropriate updates before selecting it
ordered properly, or by some crazy complex combinations of the if,
index, and substr functions (all multiple times in one query).  The last
idea is probably the worst and an crazy hack but even that could work.
In reality I would think for a reasonably small result set you would be
better off simply doing the sorting in PHP where you can define your own
sort functions (usort and friends) that will do whatever you want.


On Wed, 12 Apr 2000, Steph wrote:

> Hi. Im using MySQL and as part of my tables I have titles (of stories). My
> question os in regards to outputing those titles. Some of the titles begin
> with words such as 'The', 'A', 'An', etc. Is there a way to order these
> particular titles based on the second word in the title??
>
> ~Steph
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to