Concrete5 MySQL query issue

Permalink
Hi I'm getting following SQL error at Concrete5 (5.6.3.1) CMS, just to give you the background we've recently updated MySQL from 5.6 yo 5.7 and this has started to happen. Any fix would be highly appreciated. I've already tried repairing database but it didn't work

mysqlt error: [3065: Expression #1 of ORDER BY clause is not in SELECT list, references column 'scotnew_c5.u.uDateAdded' which is not in SELECT list; this is incompatible with DISTINCT] in EXECUTE("SELECT DISTINCT u.uID, u.uName FROM Users u left join UserSearchIndexAttributes on (UserSearchIndexAttributes.uID = u.uID) where 1=1 order by uDateAdded desc limit 0,10 ")

 
hutman replied on at Permalink Reply
hutman
for mysql 5.7 - the sql_mode needs to be set in the /etc/mysql/mysql.conf.d/mysqld.cnf

sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
shahzaib replied on at Permalink Reply
Thanks mate, aprreciated