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
Field, mySQL, ordering, substring