I just want to ask how can the order by clause be performed first before the actual select statement.
I have query under PHP:
mysql_query("SELECT GROUP_CONCAT(sample_lang) AS locations
FROM postflight
WHERE rno='$cc'
ORDER BY sfno ASC") or die(mysql_error());
What the query does is to concat the values first before sorting it. What I want is to sort it by ascending first before concatting it. Any help will be appreciated. Thanks a lot!
You can use
ORDER BYinsideGROUP_CONCAT()function, tryor if you want to add
SEPARATORSQLFiddle Demo