From 7b51bc1dc2256d04bc980ea2063c3a9be79d9310 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 11 May 2001 11:10:33 +0000 Subject: Possible fix for SQL JOIN syntax and MySQL 3.22 git-svn-id: file:///svn/phpbb/trunk@269 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/sessions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/sessions.php') diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index 5229bc4bf7..3c7e084468 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -225,11 +225,11 @@ function session_pagestart($user_ip, $thispage_id, $session_length) // $sql = "SELECT u.*, s.*, b.ban_ip, b.ban_userid FROM ".SESSIONS_TABLE." s - LEFT JOIN ".BANLIST_TABLE." b ON ( (b.ban_ip = '$int_ip' OR b.ban_userid = u.user_id) - AND ( b.ban_start < $current_time AND b.ban_end > $current_time ) ) - LEFT JOIN ".USERS_TABLE." u ON ( u.user_id = s.session_user_id) + LEFT JOIN ".BANLIST_TABLE." b ON b.ban_ip = '$int_ip' OR b.ban_userid = u.user_id + LEFT JOIN ".USERS_TABLE." u ON u.user_id = s.session_user_id WHERE s.session_id = '".$sessiondata['sessionid']."' - AND s.session_ip = '$int_ip'"; + AND s.session_ip = '$int_ip' + AND b.ban_start < $current_time AND b.ban_end > $current_time"; $result = $db->sql_query($sql); if (!$result) { -- cgit v1.2.1