diff --git a/top_nav.php b/top_nav.php index f60f9290..d8f88455 100644 --- a/top_nav.php +++ b/top_nav.php @@ -37,26 +37,26 @@ - + + $sql_notifications = mysqli_query($mysqli, "SELECT * FROM notifications + LEFT JOIN clients ON notification_client_id = client_id + WHERE notification_dismissed_at IS NULL + AND (notification_user_id = $session_user_id OR notification_user_id = 0) + ORDER BY notification_id DESC LIMIT 5" + ); + ?> 0) { ?>