executeS(' SELECT c.`id_customer` FROM '. _DB_PREFIX_ .'customer c LEFT JOIN '. _DB_PREFIX_ .'referralprogram rp ON (rp.`id_customer` = c.`id_customer` AND rp.`id_sponsor` = ' . (int)Configuration::get('CONF_TRACKING_ADLEAD_SPONSOR') . ') WHERE c.`date_add` >= DATE_SUB(NOW(), INTERVAL 3 DAY) AND rp.`id_customer` IS NOT NULL AND rp.`id_customer` NOT IN ( SELECT amtu.`id_customer` FROM '. _DB_PREFIX_ .'ant_marketing_tracking_users amtu WHERE 1 -- WHERE amtu.`id_tracking` = '.(int)$tracking->id_tracking.' ) '); //echo "
";var_dump($customers);echo "
"; foreach ($customers as $customer) { $tracking->addSubscribe((int)$customer['id_customer']); } } exit;