Order by LIKE
Posted on 2014-03-15
Is it possible to order by like?
I know that is broad.
What I am trying to do is order by the year of a car, but the only info on the year is in the listing_title.
listing_title = 1987 Cheve C10
listing_title = C10 1991 great year and has 350ci
listing_title = 1983 Chevrolet Cheyenne 10
I want a way for my visitors to view by year, I can make an array of all of the options if that helps.
$years = array(1991,1992,1993,1994...)
$sortoptions = 'ORDER BY --- ASC';