Advertisement:

Author Topic: "Sent Items" database error  (Read 364 times)

Offline Ali_

  • Semi-Newbie
  • *
  • Posts: 64
"Sent Items" database error
« on: December 06, 2019, 12:27:37 AM »
Hi everyone,

I get the following error whenever I go to my PMs and click on "Sent Items" to see what I have already sent to other users:

DATABASE ERROR:

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mysmfwebsite.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /var/www/Sources/PersonalMessage.php
Line: 700

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.


Not sure what the problem is, or how to solve.  Anyone come across this issue or have a fix?
« Last Edit: December 06, 2019, 12:58:16 AM by Ali_ »

Offline SpacePhoenix

  • Jr. Member
  • **
  • Posts: 126
Re: "Sent Items" database error
« Reply #1 on: December 06, 2019, 03:25:18 AM »
Your host has probably upgraded MySQL to a newer version. MySQL has various "strict mode" settings, you've falled foul of the group by strict setting.

Have a look for a line in my.ini (MySQL's configuration file) that looks similar to:

Quote
sql-mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Remove the:

Quote
ONLY_FULL_GROUP_BY

from that line (don't forget to remove any excess , ), save, then reboot the server