function resetDemo() { checkConn(); unset($_SESSION['lastTextTime']); unset($_SESSION['lastAction']); $sql = "TRUNCATE TABLE `akshhhlt_blupay`.`users`"; $result = mysqli_query($GLOBALS['sqli_conn'], $sql); logToFile($sql, $result); echo "reset successful"; return "reset successful"; }
function displayExecTime($sql) { ini_set('max_execution_time', 0); $msc = microtime(true); $result = mysql_query($sql); $msc = microtime(true) - $msc; echo '<p>Your query was: ' . $sql . '<br/>'; echo 'Execution time: ' . $msc . '</p>'; } //set variables here require_once 'globals.php'; $db = mysql_connect(DBHOST, DBUSER, DBPASS); $curdb = mysql_select_db(DBNAME, $db); $sql = "select * from hpq_aquaequip"; $result = mysql_query($sql); if (!checkConn($db)) { echo 'Lost connection...please reconnect.'; exit; } else { //echo 'Connection established!'; mysql_free_result($result); if (isset($_POST['query'])) { switch ($_POST['query']) { case "0": echo 'Please select a query from the dropdown box in the previous page.'; exit; break; case "1": displayReport1("SELECT educal, count(id) FROM hpq_mem \n\t\t\t\t\t\tWHERE memno=1 AND jobind = 2 AND entrepind = 2 GROUP BY educal ORDER BY educal"); break; case "2":