diff --git a/classes/Notification.php b/classes/Notification.php index 19b1337d0..70dd4a2f0 100644 --- a/classes/Notification.php +++ b/classes/Notification.php @@ -148,7 +148,7 @@ class NotificationCore return Db::getInstance()->execute(' UPDATE `'._DB_PREFIX_.'employee` SET `id_last_'.bqSQL($type).'` = ( - SELECT MAX(`id_'.$type.'`) + SELECT IFNULL(MAX(`id_'.$type.'`), 0) FROM `'._DB_PREFIX_.(($type == 'order') ? bqSQL($type).'s' : bqSQL($type)).'` ) WHERE `id_employee` = '.(int)$cookie->id_employee);