Skip to content

Commit

Permalink
Remove the having clause as well as having needs a group by
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Aug 3, 2020
1 parent 2c20f50 commit 9790d61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -4989,8 +4989,7 @@ public function alphabetQuery() {
$sqlParts = $this->getSearchSQLParts(NULL, NULL, NULL, FALSE, FALSE, TRUE);
$query = "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
{$sqlParts['from']}
{$sqlParts['where']}
{$sqlParts['having']}";
{$sqlParts['where']}";
$dao = CRM_Core_DAO::executeQuery($query);
return $dao;
}
Expand Down

0 comments on commit 9790d61

Please sign in to comment.