diff --git a/classes/Notification.php b/classes/Notification.php index ac75cedc9..2f971318d 100644 --- a/classes/Notification.php +++ b/classes/Notification.php @@ -42,7 +42,7 @@ class Notification public static function getLastElementsIdsByType($type, $id_last_element) { - return Db::getInstance()->ExecuteS('SELECT id_'.$type.' FROM `'._DB_PREFIX_.(($type == 'order') ? $type.'s' : $type).'` WHERE `id_'.$type.'` > '.$id_last_element); + return Db::getInstance()->ExecuteS('SELECT id_'.$type.' FROM `'._DB_PREFIX_.(($type == 'order') ? $type.'s' : $type).'` WHERE `id_'.$type.'` > '.$id_last_element.' ORDER BY `id_'.$type.'` DESC LIMIT 5'); } public function updateEmployeeLastElement($type)