[fix] bad currentBan report

This commit is contained in:
Knah Tsaeb 2015-07-21 15:37:55 +02:00
parent dfa164d699
commit 50ca517960
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<?php
function getCurrentBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
$sql = mysqli_query($db, "SELECT id,service,ip,ban_date,ban_time,country,countryCode FROM bans WHERE bans.ip NOT IN ( SELECT unbans.ip FROM unbans WHERE bans.ip=unbans.ip) ORDER BY $sortBy $order");
$sql = mysqli_query($db, "SELECT id,service,ip,ban_date,ban_time,country,countryCode FROM bans WHERE bans.id NOT IN ( SELECT unbans.id FROM unbans WHERE bans.id=unbans.id) ORDER BY $sortBy $order");
while ($rows = mysqli_fetch_assoc($sql)) {
$currentBan[] = $rows;
}