fix: mysqli_error needs MySQLi connection as parameter

This commit is contained in:
Martin Ambrus
2017-10-17 13:05:13 +02:00
parent 6ceb273163
commit ac5d3538f8
57 changed files with 178 additions and 178 deletions
+2 -2
View File
@@ -882,7 +882,7 @@ class Automation {
}
// get the capital village from the natars
$query = mysqli_query($GLOBALS['link'],'SELECT `wref` FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = 3 and `capital` = 1 LIMIT 1') or die(mysqli_error());
$query = mysqli_query($GLOBALS['link'],'SELECT `wref` FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = 3 and `capital` = 1 LIMIT 1') or die(mysqli_error($database->dblink));
$row = mysqli_fetch_assoc($query);
// start the attacks
@@ -4205,7 +4205,7 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
$crop = 800 * STORAGE_MULTIPLIER;
}
mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'vdata` SET `maxstore` = ' . $ress . ', `maxcrop` = ' . $crop . ' WHERE `wref` = ' . $row['vref']) or die(mysqli_error());
mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'vdata` SET `maxstore` = ' . $ress . ', `maxcrop` = ' . $crop . ' WHERE `wref` = ' . $row['vref']) or die(mysqli_error($database->dblink));
}
}