1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 03:54:10 +01:00

[ticket/9992] Use sql_fetchfield for single row and single column result

PHPBB3-9992
This commit is contained in:
Nils Adermann 2011-06-10 18:37:29 +02:00
parent 2dee57fd43
commit c8828473a8

View File

@ -85,9 +85,8 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
}
$result = $db->sql_query($sql);
$attempts_row = $db->sql_fetchrow($result);
$attempts = (int) $db->sql_fetchfield('count');
$db->sql_freeresult($result);
$attempts = $attempts_row['count'];
$attempt_data = array(
'attempt_ip' => $ip,