MySQL strict mode May 04, 2017, 12:26:11 am Hi,I encountered this error while trying to open Sent ItemsCode: [Select]Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'databasename.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_byFile: /srv/users/serverpilot/apps/appname/public/sources/subs/PersonalMessage.subs.phpLine: 1034Note: Your database version is 1.0.10.after a litte search I found that I must disable MySQL strict mode on my serverpilot's VPSAFAIK MySQL strict mode was enabled by default since MySQL 5.7, should Elkarte aware of this?Regards,Lukas
Re: MySQL strict mode Reply #1 – May 04, 2017, 12:36:25 am Try replacing the:Code: [Select]'sort' => $pm_options['sort_by_query'],of the query, with:Code: [Select]'sort' => $pm_options['sort_by_query'] === 'pm.id_pm' ? 'MAX(pm.id_pm)' : $pm_options['sort_by_query'], 1 Likes
Re: MySQL strict mode Reply #2 – May 04, 2017, 08:52:52 am DoneNice to know, reenabled MySQL strict mode now...Thanks
Re: MySQL strict mode Reply #4 – May 04, 2017, 11:03:10 am Something similar was already reported here http://www.elkarte.net/community/index.php?topic=4185.0
Re: MySQL strict mode Reply #5 – May 04, 2017, 12:19:48 pm Quote from: emanuele - May 04, 2017, 08:57:13 amLet me know if it works! it works Quote from: radu81 - May 04, 2017, 11:03:10 amSomething similar was already reported here http://www.elkarte.net/community/index.php?topic=4185.0you're right it's similar, I wonder why I did not see your thread at first search...
Re: MySQL strict mode Reply #6 – May 04, 2017, 12:40:42 pm Tracked https://github.com/elkarte/Elkarte/issues/2926