mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/9992] Use sql_fetchfield for single row and single column result
PHPBB3-9992
This commit is contained in:
parent
2dee57fd43
commit
c8828473a8
1 changed files with 1 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue