Actions
Anomalie #1667
ferméSQL error on getChartContribsAllTime() with MySQL
Début:
23/02/2023
Echéance:
% réalisé:
100%
Temps estimé:
Version utilisée:
Vote:
Description
MySQL has a default SQL mode enabled (only_full_group_by
) which causes the error below on the charts page.
https://dev.mysql.com/doc/refman/8.0/en/group-by-handling.html
source:/galette/lib/Galette/IO/Charts.php@develop#L376
Détails
Type : PDOException
Code : 42000
Message : SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'galette-dev.galette_cotisations.date_enreg' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Fichier : C:\laragon\www\galette-dev\galette\vendor\laminas\laminas-db\src\Adapter\Driver\Pdo\Connection.php
Ligne : 376
Trace
#0 C:\laragon\www\galette-dev\galette\vendor\laminas\laminas-db\src\Adapter\Driver\Pdo\Connection.php(376): PDO->query('SELECT date_for...')
#1 C:\laragon\www\galette-dev\galette\vendor\laminas\laminas-db\src\Adapter\Adapter.php(194): Laminas\Db\Adapter\Driver\Pdo\Connection->execute('SELECT date_for...')
#2 C:\laragon\www\galette-dev\galette\lib\Galette\Core\Db.php(788): Laminas\Db\Adapter\Adapter->query('SELECT date_for...', 'execute')
#3 C:\laragon\www\galette-dev\galette\lib\Galette\IO\Charts.php(383): Galette\Core\Db->execute(Object(Laminas\Db\Sql\Select))
#4 C:\laragon\www\galette-dev\galette\lib\Galette\IO\Charts.php(100): Galette\IO\Charts->getChartContribsAllTime()
[...]
Actions