From 4f331640702e6604548fc62f65e42325f95f6165 Mon Sep 17 00:00:00 2001 From: mattbk Date: Sun, 1 Nov 2015 14:08:12 -0600 Subject: [PATCH] Removed reference to vcd_results table --- index.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/index.php b/index.php index 7087e93..29b25df 100755 --- a/index.php +++ b/index.php @@ -78,30 +78,7 @@ switch ($mode) { case 'finish': $template = 'finish.html.twig'; // Store the result. -// This section will be removed - $query = $db->prepare('insert into vcd_results values (null, unix_timestamp(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); - $query->bind_param( - 'siiiiiiiii', - $_SERVER['REMOTE_ADDR'], - $_SESSION['results']['scene1']['xcoordinate'], - $_SESSION['results']['scene1']['ycoordinate'], - $_SESSION['results']['scene1']['responsetime'], - $_SESSION['results']['scene2']['xcoordinate'], - $_SESSION['results']['scene2']['ycoordinate'], - $_SESSION['results']['scene2']['responsetime'], - $_SESSION['results']['scene3']['xcoordinate'], - $_SESSION['results']['scene3']['ycoordinate'], - $_SESSION['results']['scene3']['responsetime'] - ) or die('Could not prepare query'); - $query->execute() or die('Could not execute query:
'.mysqli_error($db)); - $query->close(); - // End remove section - - //Store the result. //Loop through $results better - //This will allow running only one query rather than several: http://stackoverflow.com/a/10054657/2152245 - //Because I have `phase` as a field, I can also have `xcoordinate`, `ycoordinate`, and `responsetime` - // as values as well. Table should have a field list of: uid, datetime, host, userid, phase, xcoordinate, ycoordinate, responsetime. // SELECT query should then return one row per userid per phase/scene. foreach ($_SESSION['results'] as $phasename => $phasevalue) { //Initialize arrays -- 2.39.5