function processContacts(&$config, $processGeocode, $parseStreetAddress) {
// build where clause.
$clause = array('( c.id = a.contact_id )');
+ $params = array();
if ($this->start) {
- $clause[] = "( c.id >= $this->start )";
+ $clause[] = "( c.id >= %1 )";
+ $params[1] = array($this->start, 'Integer');
}
if ($this->end) {
- $clause[] = "( c.id <= $this->end )";
+ $clause[] = "( c.id <= %2 )";
+ $params[2] = array($this->end, 'Integer');
}
if ($processGeocode) {
$totalGeocoded = $totalAddresses = $totalAddressParsed = 0;
- $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
-
+ $dao = CRM_Core_DAO::executeQuery($query, $params);
if ($processGeocode) {
require_once (str_replace('_', DIRECTORY_SEPARATOR, $config->geocodeMethod) . '.php');
}