title: MySQL: sort list of values before use it in the query
body: <p>Can I sort list of values before use it in the query?</p>
  
  <p>Like <code>SELECT SORTINGFN(2,3,1)</code> and get <code>1,2,3</code>?
  Something like <code>SELECT 2,3,1 ORDER BY ??? ASC</code>, but order by what?</p>
  
  <p>I need to make sure the arguments are always in the same order, to get the same hash from <code>MD5('1,2,3')</code> and <code>MD5('2,3,1')</code></p>