mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 09:20:58 +01:00
redundant ORDER BY
This commit is contained in:
parent
8257773807
commit
90eb8f1f37
@ -647,7 +647,7 @@ function checkBan($board = 0) {
|
|||||||
if (event('check-ban', $board))
|
if (event('check-ban', $board))
|
||||||
return true;
|
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(':ip', $_SERVER['REMOTE_ADDR']);
|
||||||
$query->bindValue(':board', $board);
|
$query->bindValue(':board', $board);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
Loading…
Reference in New Issue
Block a user