Sort parameter values
Posted on 2013-11-14
I have an mysql query which need to be filtered by the values from a parameter that looks like this: <url>?featuresId=18, 2, 50
The issue is that i need the values to be ordered ascending in order to display the correct results. The received values should be like (2,18,50)
My sql query looks something like this:
get_features_query = "select * from features where feature_name like '%|" . str_replace(",", "|%|", $HTTP_GET_VARS['featuresId']) . "|%'"