fix: alliance deletion check

This commit is contained in:
Martin Ambrus
2017-11-04 10:32:30 +01:00
parent 89fc24e1f7
commit 36bfb2b8f7
+1 -1
View File
@@ -1825,7 +1825,7 @@ class MYSQLi_DB implements IDbConnection {
function deleteAlliance($aid) {
list($aid) = $this->escape_input((int) $aid);
$result = mysqli_fetch_array(mysqli_query($this->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users where alliance = $aid", MYSQLI_ASSOC));
$result = mysqli_fetch_array(mysqli_query($this->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users where alliance = $aid"), MYSQLI_ASSOC);
if ($result['Total'] == 0) {
// remove the alliance
$q = "DELETE FROM " . TB_PREFIX . "alidata WHERE id = $aid";