Hi Aleksandar, On Mon, Apr 08, 2002 at 04:43:11PM +0200, Aleksandar Bradaric wrote: > > Table example: > > _The Rock > > Scary Movie > > X-Files > > > With order I want the output > > Scary Movie > > _The Rock > > X-Files > > After reading your message again, look like this is what > you've been searching for. Sorry :( > > select * from movies order by substring_index(movietitle, '_', -1); > > And if you have underscores in the rest of the title, it > won't work well...
Yes, this is the query that I want. The table have around 100,000 entries and the string manipulate cost time, so I use a new column. Thanx to all they have answered. Bernd --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php