[ticket/9687] Adjust query to use join again

PHPBB3-9687
This commit is contained in:
Marc Alexander 2023-11-05 21:12:20 +01:00
parent 0901633349
commit 744bf162b3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -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)",
);