getRow(' SELECT `id_customer` FROM `'._DB_PREFIX_.'customer` WHERE `email` = "'.pSQL($line[2]).'" ')) { if(strtolower($line[3]) == 'faux') { $active = 0; } else { $active = (int) $line[1]; } $db->ExecuteS(' UPDATE `'._DB_PREFIX_.'customer` SET `newsletter` = '.(int) $active.', `newsletter_date_add` = NOW() WHERE `email` = "'.pSQL($line[2]).'" LIMIT 1 '); } } } fclose($f); rename($filename, str_replace('/emarsys/', '/emarsys_done/', $filename)); }