Sterc / FormIt

A dynamic form processing Snippet for MODX Revolution
https://docs.modx.com/current/en/extras/formit
33 stars 58 forks source link

Fix GROUP BY error if sql_mode "ONLY_FULL_GROUP_BY" is used [2.x] #295

Open halftrainedharry opened 4 months ago

halftrainedharry commented 4 months ago

What does it do?

Changes the SQL query to only include the columns the result is grouped by (plus the 'id' column).

Why is it needed?

If the SQL-mode "ONLY_FULL_GROUP_BY" is used, the current code throws an error.

Related issue(s)/PR(s)

Resolves #293 for the 2.x branch. Undoes the change from #281 (as I don't think it fixed the issue successfully).