From 839e7fe17f1d6b706a7b8b0015b3e95a55409257 Mon Sep 17 00:00:00 2001 From: mattbk Date: Thu, 29 Oct 2015 13:26:43 -0500 Subject: [PATCH] Understanding database schema Also halfway making sure this works with new phase names, but still need to generalize the variable lookup so phase names don't matter in this file. --- index.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/index.php b/index.php index a48045f..396be7f 100755 --- a/index.php +++ b/index.php @@ -80,17 +80,17 @@ switch ($mode) { $query->bind_param( 'siiiiiiiii', $_SERVER['REMOTE_ADDR'], - $_SESSION['results']['notable']['xcoordinate'], - $_SESSION['results']['notable']['ycoordinate'], - $_SESSION['results']['notable']['responsetime'], - $_SESSION['results']['unnoted']['xcoordinate'], - $_SESSION['results']['unnoted']['ycoordinate'], - $_SESSION['results']['unnoted']['responsetime'], - $_SESSION['results']['renoted']['xcoordinate'], - $_SESSION['results']['renoted']['ycoordinate'], - $_SESSION['results']['renoted']['responsetime'] + $_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'); + $query->execute() or die('Could not execute query:
'.mysqli_error($db)); $query->close(); break; case 'results': @@ -142,7 +142,7 @@ switch ($mode) { } $variables['data'][] = $data; - // Build statistics + // Build statisticsmat foreach ($settings->phases as $phase) { $stats[$phase] = array( 'correct' => (($data[$phase]['xcoordinate'] >= $settings->elementLocations->{$phase}->topleft->x)