modxcms / xpdo

xPDO Object Relational Bridge for PHP
http://xpdo.org/
GNU General Public License v2.0
72 stars 53 forks source link

[MySQL8] groupby sort issue #190

Open Jako opened 3 years ago

Jako commented 3 years ago

The following code does not work anymore with MySQL 8:

$c->groupby($this->classKey . '.key', 'ASC');

According to @digitalpenguin it has to be reduced to:

$c->groupby($this->classKey . '.key');

muzzwood commented 3 years ago

Here's some info about it: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-sql-changes

It now needs to be done with an ORDER BY clause.

Jako commented 2 years ago

Yes, but xPDO has to handle this or throw/log some deprecated message.