diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-29 08:41:36 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-29 08:41:36 +1000 |
| commit | 90eb8f1f3765afc848f7a3f7f12d83a46fe9e92f (patch) | |
| tree | c9624c5bb6f6616eb3770e4151fefb65603b80ed /inc/functions.php | |
| parent | 82577738072a833aa0ec8ed6e798d684d1abea1d (diff) | |
redundant ORDER BY
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index ec37a617..1bd185a9 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -647,7 +647,7 @@ function checkBan($board = 0) { if (event('check-ban', $board)) return true; - $query = prepare("SELECT `set`, `expires`, `reason`, `board`, `seen`, ``bans``.`id` FROM ``bans`` WHERE (`board` IS NULL OR `board` = :board) AND `ip` = :ip ORDER BY `expires` IS NULL DESC, `expires` DESC, `expires` DESC LIMIT 1"); + $query = prepare("SELECT `set`, `expires`, `reason`, `board`, `seen`, ``bans``.`id` FROM ``bans`` WHERE (`board` IS NULL OR `board` = :board) AND `ip` = :ip ORDER BY `expires` IS NULL DESC, `expires` DESC LIMIT 1"); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); $query->bindValue(':board', $board); $query->execute() or error(db_error($query)); |
