Skip to content

Commit

Permalink
Add item to GROUP BY for new MySQL 5.7 default compatibility.
Browse files Browse the repository at this point in the history
PHP message: PHP Fatal error:  Uncaught Exception: There was a problem with the database: Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'coral_organizations.OHP.parentOrganizationID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/coral/organizations/admin/classes/common/DBService.php:39
Stack trace:
#0 /var/www/coral/organizations/admin/classes/common/DBService.php(71): DBService->checkForError()
#1 /var/www/coral/organizations/admin/classes/domain/Organization.php(550): DBService->processQuery('SELECT O.organi...', 'assoc')
#2 /var/www/coral/organizations/ajax_htmldata.php(895): Organization->search(Array, 'TRIM(LEADING 'T...', '')
#3 {main}
  thrown in /var/www/coral/organizations/admin/classes/common/DBService.php on line 39
  • Loading branch information
t4k committed Jun 13, 2017
1 parent a87e68b commit c58f8b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion organizations/admin/classes/domain/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public function search($whereAdd, $orderBy, $limit){
LEFT JOIN ContactRoleProfile CRP ON C.contactID = CRP.contactID
LEFT JOIN ContactRole CR ON CR.contactRoleID = CRP.contactRoleID
" . $whereStatement . "
GROUP By O.organizationID
GROUP By O.organizationID, OHP.parentOrganizationID
ORDER BY " . $orderBy . $limitStatement;


Expand Down

0 comments on commit c58f8b7

Please sign in to comment.