summaryrefslogtreecommitdiff
path: root/html/import/import_lms.php
diff options
context:
space:
mode:
authorMatthijs Kuiper <info@matthijskuiper.nl>2018-01-14 20:08:50 +0100
committerMatthijs Kuiper <info@matthijskuiper.nl>2018-09-01 11:48:28 +0200
commit7e5c50603cbe1307d68a2b5b8ee14409e15a9dcb (patch)
tree0fff0499b4d94f8ed2e13d72bfd97dec51cd283e /html/import/import_lms.php
parent4d21dfcac97fd02c186bb3ce4085275b36e3790e (diff)
Update to mysqli
Diffstat (limited to 'html/import/import_lms.php')
-rwxr-xr-xhtml/import/import_lms.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/html/import/import_lms.php b/html/import/import_lms.php
index eb3ebd7..df752f1 100755
--- a/html/import/import_lms.php
+++ b/html/import/import_lms.php
@@ -13,19 +13,19 @@
$sql_eventslms = "INSERT INTO uts_events
(matchid, playerid, col0, col1, col2, col3, col4) VALUES
($matchid, $playerid, '$col0', '$col1', '$col2', '$col3', '$col4')";
- mysql_query($sql_eventslms) or die (mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], $sql_eventslms) or die (mysqli_error($GLOBALS["___mysqli_link"]));
// Fix ttl
$ttl = ($outtime[col0] - $gamestart) / ($qc_deaths[col4] + $q_suicides[col4]);
- mysql_query("UPDATE uts_player SET ttl = $ttl WHERE id = $playerecordid") or die(mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], "UPDATE uts_player SET ttl = $ttl WHERE id = $playerecordid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
}
else {
$disconnect = small_query("SELECT col0 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'Disconnect' AND col3 = $playerid");
if ((!empty($disconnect[col0])) and (intval($disconnect[col0]) < intval($gameend))) {
// echo " get out time ";
$outtime = $player_left - $gamestart;
- $q_out = mysql_query($sql_out);
+ $q_out = mysqli_query($GLOBALS["___mysqli_link"], $sql_out);
$col0 = $disconnect[col0];
$col1 = 'out';
$col2 = intval($disconnect[col0] - $gamestart); //time
@@ -35,12 +35,12 @@
$sql_eventslms = "INSERT INTO uts_events
(matchid, playerid, col0, col1, col2, col3, col4) VALUES
($matchid, $playerid, '$col0', '$col1', '$col2', '$col3', '$col4')";
- mysql_query($sql_eventslms) or die (mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], $sql_eventslms) or die (mysqli_error($GLOBALS["___mysqli_link"]));
// Update ttl and set score to 0
$ttl = ($disconnect[col0] - $gamestart) / ($qc_deaths[col4] + $q_suicides[col4]);
- mysql_query("UPDATE uts_player SET ttl = $ttl, gamescore = 0 WHERE id = $playerecordid") or die(mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], "UPDATE uts_player SET ttl = $ttl, gamescore = 0 WHERE id = $playerecordid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
}
}
?>