diff --git a/MailAlert.php b/MailAlert.php index 22ca661..93ffe63 100644 --- a/MailAlert.php +++ b/MailAlert.php @@ -95,7 +95,7 @@ public static function deleteAlert($id_customer, $customer_email, $id_product, $ $sql = ' UPDATE `' . _DB_PREFIX_ . self::$definition['table'] . '` set `deleted` = 1 ' . ($notification_sent ? ', `notification_sent` = NOW()' : '') . - ' WHERE ' . (($id_customer > 0) ? '(`customer_email` = \'' . pSQL($customer_email) . '\' OR `id_customer` = ' . (int) $id_customer . ')' : + ' WHERE ' . (($id_customer > 0) ? '(`customer_email` = \'' . pSQL($customer_email) . '\' OR `id_customer` = ' . (int) $id_customer . ')' : '`customer_email` = \'' . pSQL($customer_email) . '\'') . ' AND `id_product` = ' . (int) $id_product . ' AND `id_product_attribute` = ' . (int) $id_product_attribute . '