mysql, ordering by a substring of a field

A table of mine has a field called title, which I want to order by. However, many of the titles (not all though) start with S*, i.e. S*AAA or S*BBB. When ordering I want to ignore the S* part, but since all titles does not start with S* I cannot simply remove the first two characters with the substring() function.

I’m basically looking for an SQL equivalent to php’s ltrim($title, "S*") :2sm

View full post on Tycoon Talk

, , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved