From 744bf162b3769f12e7128263a7fa57a8e9d5a986 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 5 Nov 2023 21:12:20 +0100 Subject: [PATCH] [ticket/9687] Adjust query to use join again PHPBB3-9687 --- phpBB/index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/index.php b/phpBB/index.php index 9f240d4f27..fafe5f9ff1 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -112,7 +112,14 @@ if ($show_birthdays) 'FROM' => array( USERS_TABLE => 'u', ), - 'WHERE' => 'u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ") + 'LEFT_JOIN' => array( + array( + 'FROM' => array(BANS_TABLE => 'b'), + 'ON' => 'u.user_id = b.ban_userid', + ), + ), + 'WHERE' => 'b.ban_id IS NULL + AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ") AND (u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' $leap_year_birthdays)", );