From ab3a6763c0a9a24a4c704013d2eed8fa4a9e0d0e Mon Sep 17 00:00:00 2001 From: mattbk Date: Fri, 30 Oct 2015 14:14:02 -0500 Subject: [PATCH] Solved timestamp issue, removed debug statements --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 9fdd5bf..a71929e 100755 --- a/index.php +++ b/index.php @@ -116,10 +116,10 @@ switch ($mode) { $columnstoimplode = array("uid", "datetime", "host", "phase", "measure", "value"); // Note that backticks (`) go around field names... $columns = "`".implode("`, `", $columnstoimplode)."`"; - //print_r($columns); - $valuestoimplode = array("", "unix_timestamp()", $_SERVER['REMOTE_ADDR'], $phasename, $measure, $measurevalue); + // Set up timestamp so you can tell participants apart. http://alvinalexander.com/php/php-date-formatted-sql-timestamp-insert + $timestamp = date('Y-m-d G:i:s'); + $valuestoimplode = array("", $timestamp, $_SERVER['REMOTE_ADDR'], $phasename, $measure, $measurevalue); $values = "'".implode("', '", $valuestoimplode)."'"; - //print_r($values); // Build and execute query $sql = "INSERT INTO results ("; $sql .= $columns;