diff options
author | Matthijs Kuiper <info@matthijskuiper.nl> | 2018-01-14 20:08:50 +0100 |
---|---|---|
committer | Matthijs Kuiper <info@matthijskuiper.nl> | 2018-09-01 11:48:28 +0200 |
commit | 7e5c50603cbe1307d68a2b5b8ee14409e15a9dcb (patch) | |
tree | 0fff0499b4d94f8ed2e13d72bfd97dec51cd283e /html/pages/maps.php | |
parent | 4d21dfcac97fd02c186bb3ce4085275b36e3790e (diff) |
Update to mysqli
Diffstat (limited to 'html/pages/maps.php')
-rw-r--r-- | html/pages/maps.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/html/pages/maps.php b/html/pages/maps.php index bd1106e..4baa5f7 100644 --- a/html/pages/maps.php +++ b/html/pages/maps.php @@ -95,8 +95,8 @@ echo' <option value="0">*</option>';
$sql_game = "SELECT DISTINCT(p.gid), g.name FROM uts_player AS p, uts_games AS g WHERE p.gid = g.id ORDER BY g.name ASC";
- $q_game = mysql_query($sql_game) or die(mysql_error());
- while ($r_game = mysql_fetch_array($q_game)) {
+ $q_game = mysqli_query($GLOBALS["___mysqli_link"], $sql_game) or die(mysqli_error($GLOBALS["___mysqli_link"]));
+ while ($r_game = mysqli_fetch_array($q_game)) {
$selected = ($r_game['gid'] == $gid) ? 'selected' : '';
echo '<option '.$selected.' value="'.$r_game['gid'].'">'. $r_game['name'] .'</option>';
}
@@ -120,9 +120,9 @@ echo '</select> $sql_maps = "SELECT IF(RIGHT(mapfile,4) LIKE '.unr', mapfile, CONCAT(mapfile, '.unr')) as mapfile, COUNT(id) AS matchcount, AVG(frags) AS frags, AVG(t0score+t1score+t2score+t3score) AS matchscore, SUM(gametime) AS gametime
FROM uts_match" . $sql_condition . " GROUP BY mapfile ORDER BY $filter $sort LIMIT $qpage,25";
-$q_maps = mysql_query($sql_maps) or die(mysql_error());
+$q_maps = mysqli_query($GLOBALS["___mysqli_link"], $sql_maps) or die(mysqli_error($GLOBALS["___mysqli_link"]));
-while ($r_maps = mysql_fetch_array($q_maps)) {
+while ($r_maps = mysqli_fetch_array($q_maps)) {
$r_mapfile = un_ut($r_maps[mapfile]);
$myurl = urlencode($r_mapfile);
$r_gametime = GetMinutes($r_maps[gametime]);
|