X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FBAO%2FQuery.php;h=e7760714fbb15e7422d34e8feb5236d7ad344e32;hb=64e59809d10c3ff342718a28f42983ec217dc282;hp=01e8afe19cd30ce6488a13fa202d0ab6440deaf6;hpb=11df99209d13885aaf45a5c94612bdc65eb490ff;p=civicrm-core.git diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 01e8afe19c..e7760714fb 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -2903,12 +2903,12 @@ WHERE id IN ( $groupIDs ) $groupIDsFiltered = implode(',', $groupsFiltered); if ($tableAlias == NULL) { - $tableAlias = "civicrm_group_contact_cache_{$groupIDsFiltered}"; + $tableAlias = "`civicrm_group_contact_cache_{$groupIDsFiltered}`"; } - $this->_tables["`{$tableAlias}`"] = $this->_whereTables["`{$tableAlias}`"] = " LEFT JOIN civicrm_group_contact_cache `{$tableAlias}` ON {$joinTable}.id = `{$tableAlias}`.contact_id "; + $this->_tables[$tableAlias] = $this->_whereTables[$tableAlias] = " LEFT JOIN civicrm_group_contact_cache {$tableAlias} ON {$joinTable}.id = {$tableAlias}.contact_id "; - return "`{$tableAlias}`.group_id IN (" . $groupIDsFiltered . ")"; + return "{$tableAlias}.group_id IN (" . $groupIDsFiltered . ")"; } return NULL;