if ($justIDs) {
$tempTable = CRM_Utils_SQL_TempTable::build()->createWithQuery($sql);
- $sql = "SELECT contact_a.id as contact_id FROM {$tempTable->getName()} as contact_a";
+ $sql = "SELECT contact_a.id as contact_id FROM {$tempTable->getName()} c INNER JOIN civicrm_contact contact_a ON c.id = contact_a.id";
}
return $sql;
}
$this->rebuildPreNextCache($start, $end, $sort, $cacheKey);
}
else {
+ CRM_Core_Error::deprecatedFunctionWarning('Custom searches should return sql capable of filling the prevnext cache.');
// This will always show for CiviRules :-( as a) it orders by 'rule_label'
// which is not available in the query & b) it uses contact not contact_a
// as an alias.