$op = 'LIKE';
}
$wc = self::caseImportant($op) ? "LOWER(contact_a.organization_name)" : "contact_a.organization_name";
- $this->_where[$grouping][] = self::buildClause($wc, $op,
- "'$value' AND contact_a.contact_type ='Individual'"
+ $ceWhereClause = self::buildClause($wc, $op,
+ $value
);
+ $ceWhereClause .= " AND contact_a.contact_type = 'Individual'";
+ $this->_where[$grouping][] = $ceWhereClause;
$this->_qill[$grouping][] = "$field[title] $op \"$value\"";
}
elseif ($name === 'email_greeting') {
}
$wc = 'civicrm_website.url';
- $this->_where[$grouping][] = self::buildClause($wc, $op, "'$value'");
+ $this->_where[$grouping][] = $d = self::buildClause($wc, $op, $value);
$this->_qill[$grouping][] = "$field[title] $op \"$value\"";
}
elseif ($name === 'contact_is_deleted') {
}
$value = CRM_Utils_Type::escape($value, $dataType);
-
// if we dont have a dataType we should assume
if ($dataType == 'String' || $dataType == 'Text') {
$value = "'" . strtolower($value) . "'";