From: monishdeb Date: Thu, 11 Jun 2015 11:38:22 +0000 (+0530) Subject: CRM-16653 fix - Database error when searching for certain relationship types X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=792750a5a0d94f513c2efbc47369e587de566eac;p=civicrm-core.git CRM-16653 fix - Database error when searching for certain relationship types https://issues.civicrm.org/jira/browse/CRM-16653 --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 226a664c70..3c86767ddb 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4192,6 +4192,7 @@ civicrm_relationship.is_permission_a_b = 0 $whereClause = ''; if (!empty($where[$grouping])) { $whereClause = ' WHERE ' . implode(' AND ', $where[$grouping]); + $whereClause = str_replace('contact_b', 'c', $whereClause); } $sql = " CREATE TEMPORARY TABLE {$relationshipTempTable}