MySQL 5.7

ORDER BY clause is not in SELECT list

If you have phpMyAdmin:

  1. go to the Variables tabs

  2. search label "sql mode"

  3. edit the content and delete the mode : "ONLY_FULL_GROUP_BY"

  4. save

NB: don't forget to verify the comma separator

Further Information

How to resolve “ORDER BY clause is not in SELECT list” caused MySQL 5.7 with SELECT DISTINCT and ORDER BY

https://stackoverflow.com/questions/36829911/how-to-resolve-order-by-clause-is-not-in-select-list-caused-mysql-5-7-with-sel