sampart/WhiteOctoberPagerfantaBundle

Error with MySQL5.7

Garfield-fr opened this issue · 2 comments

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'dctrn_result.name_5' which is not in SELECT list; this is incompatible with DISTINCT").

Any help welcome ?

mysql Ver 14.14 Distrib 5.7.21

Thank's

Bertrand

sstok commented

As far as I know this bundle (or it's library to be exact) doesn't perform any sorting.
Without a full query it's not possible to determine if this is caused by this library.

If you composed the query yourself please use Stack overflow or another support channel 👍
Sorting with DISTINCT is tricky, when sorting, all the fields that you are sorting must be in the DISTINCT list as otherwise you can't be sure which record get's used first.

It's possible you recently enabled MySQL strict modes? which gives a warning for this, in the past this was silently accepted but with highly unpredictable behavior.

ok. Thank's