* @access public
* @static
*/
- public static function getTotalCount($mailing_id, $job_id = NULL,
- $is_distinct = FALSE
- ) {
+ public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
$dao = new CRM_Core_DAO();
$bounce = self::getTableName();
ON $job.mailing_id = $mailing.id
WHERE $mailing.id = " . CRM_Utils_Type::escape($mailing_id, 'Integer');
+ if (!empty($toDate)) {
+ $query .= " AND $bounce.time_stamp <= $toDate";
+ }
+
if (!empty($job_id)) {
$query .= " AND $job.id = " . CRM_Utils_Type::escape($job_id, 'Integer');
}
return $results;
}
}
-