I am trying to write a query (mysql 3.23) that will sort results using one
or two substrings in item number. So for example I have item numbers that
start with SE0000, TS0000, N00000, W000000, etc.

So let say I want results sorted in the following order

TS0000, SE0000, N00000, W00000

I have tried the following in my query but it's not sorting properly:

ORDER BY FIELD(LEFT(item_number, 2) , 'TS'), FIELD(LEFT(item_number, 1)
'N','W')

So my question is, should I put results in an array, then sort the array
instead of trying to sort from mysql?

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

Reply via email to