From 0d602e1722a0a75f2f4a9ab90eeeb2a47042417f Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 4 Jul 2011 19:57:54 -0400 Subject: [ticket/10247] Use COUNT(*) instead of COUNT(attempt_id) attempt_id column was deleted PHPBB3-10247 --- phpBB/includes/auth/auth_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 018d5cce70..6ca69d9174 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -72,7 +72,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for if (($ip && !$config['ip_login_limit_use_forwarded']) || ($forwarded_for && $config['ip_login_limit_use_forwarded'])) { - $sql = 'SELECT COUNT(attempt_id) AS attempts + $sql = 'SELECT COUNT(*) AS attempts FROM ' . LOGIN_ATTEMPT_TABLE . ' WHERE attempt_time > ' . (time() - (int) $config['ip_login_limit_time']); if ($config['ip_login_limit_use_forwarded']) -- cgit v1.2.1