From 7e5c50603cbe1307d68a2b5b8ee14409e15a9dcb Mon Sep 17 00:00:00 2001 From: Matthijs Kuiper Date: Sun, 14 Jan 2018 20:08:50 +0100 Subject: Update to mysqli --- html/pages/admin/main.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'html/pages/admin/main.php') diff --git a/html/pages/admin/main.php b/html/pages/admin/main.php index 697909a..569d142 100644 --- a/html/pages/admin/main.php +++ b/html/pages/admin/main.php @@ -3,7 +3,7 @@ if (empty($import_adminkey) or isset($_REQUEST['import_adminkey']) or $import_ad if (isset($_REQUEST['droptable'])) { $droptable = my_addslashes($_REQUEST['droptable']); if (substr($droptable, 0, 9) == 'uts_temp_' and strlen($droptable) == 17) { - mysql_query("DROP TABLE $droptable;") or die(mysql_error()); + mysqli_query($GLOBALS["___mysqli_link"], "DROP TABLE $droptable;") or die(mysqli_error($GLOBALS["___mysqli_link"])); } else { die('NO!'); } @@ -22,11 +22,11 @@ echo'Database Statistics'; -$q_dbsize = mysql_query("SHOW table STATUS") or die(mysql_error()); +$q_dbsize = mysqli_query($GLOBALS["___mysqli_link"], "SHOW table STATUS") or die(mysqli_error($GLOBALS["___mysqli_link"])); $tot_size = 0; $tot_rows = 0; $max_size = 0; -while ($r_dbsize = mysql_fetch_array($q_dbsize)) { +while ($r_dbsize = mysqli_fetch_array($q_dbsize)) { if (substr($r_dbsize['Name'], 0, 4) != 'uts_') continue; $size = $r_dbsize['Data_length'] + $r_dbsize['Index_length']; $rows = $r_dbsize['Rows']; -- cgit