Skip to content

Commit

Permalink
Fix another GROUP BY issue.
Browse files Browse the repository at this point in the history
The “Starts with” letter list was not working…
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'coral_organizations.O.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
  • Loading branch information
t4k committed Jun 13, 2017
1 parent 99617ad commit fe3cf1b
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 @@ -639,7 +639,7 @@ public function getAlphabeticalList(){
$alphArray = array();
$result = mysqli_query($this->db->getDatabase(), "SELECT DISTINCT UPPER(SUBSTR(TRIM(LEADING 'The ' FROM name),1,1)) letter, COUNT(SUBSTR(TRIM(LEADING 'The ' FROM name),1,1)) letter_count
FROM Organization O
GROUP BY SUBSTR(TRIM(LEADING 'The ' FROM name),1,1)
GROUP BY SUBSTR(TRIM(LEADING 'The ' FROM name),1,1), O.name
ORDER BY 1;");

while ($row = mysqli_fetch_assoc($result)){
Expand Down

0 comments on commit fe3cf1b

Please sign in to comment.