Summary | missing columns in GROUP BY |
Queue | Ansel |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | thpo+horde (at) dotrc (dot) de |
Created | 10/12/2011 (5015 days ago) |
Due | |
Updated | 10/14/2011 (5013 days ago) |
Assigned | 10/12/2011 (5015 days ago) |
Resolved | 10/14/2011 (5013 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Fix GROUP BY fields (
Bug: 10635).3 files changed, 5 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/6ca8ed0eb406e801b115ffeb76ba775d9d406570
State ⇒ Assigned
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ missing columns in GROUP BY
Type ⇒ Bug
State ⇒ Unconfirmed
The GROUP BY has to have all select-columns. Please add the missing
f.gallery_id and f.face_signature.
Here is the related error message:
2011-10-12T09:44:38+02:00 ERR: HORDE [ansel] SQL QUERY FAILED:
SQLSTATE[42803]: Grouping error: 7 ERROR: column "f.gallery_id" must
appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT i.face_id, f.face_name, f.image_id, f.gallery_id, f.f...
^
SELECT i.face_id, f.face_name, f.image_id, f.gallery_id,
f.face_signature FROM ansel_faces_index i, ansel_faces f WHERE
f.face_id = i.face_id AND i.face_id <> 1 GROUP BY i.face_id,
f.face_name, f.image_id HAVING count(i.face_id) > 0 ORDER BY
count(i.face_id) DESC LIMIT 20 [pid 1455 on line 812 of
"/usr/share/php/Horde/Db/Adapter/Base.php"]