Solved timestamp issue, removed debug statements

This commit is contained in:
mattbk
2015-10-30 14:14:02 -05:00
parent 39805f9621
commit ab3a6763c0

View File

@ -116,10 +116,10 @@ switch ($mode) {
$columnstoimplode = array("uid", "datetime", "host", "phase", "measure", "value"); $columnstoimplode = array("uid", "datetime", "host", "phase", "measure", "value");
// Note that backticks (`) go around field names... // Note that backticks (`) go around field names...
$columns = "`".implode("`, `", $columnstoimplode)."`"; $columns = "`".implode("`, `", $columnstoimplode)."`";
//print_r($columns); // Set up timestamp so you can tell participants apart. http://alvinalexander.com/php/php-date-formatted-sql-timestamp-insert
$valuestoimplode = array("", "unix_timestamp()", $_SERVER['REMOTE_ADDR'], $phasename, $measure, $measurevalue); $timestamp = date('Y-m-d G:i:s');
$valuestoimplode = array("", $timestamp, $_SERVER['REMOTE_ADDR'], $phasename, $measure, $measurevalue);
$values = "'".implode("', '", $valuestoimplode)."'"; $values = "'".implode("', '", $valuestoimplode)."'";
//print_r($values);
// Build and execute query // Build and execute query
$sql = "INSERT INTO results ("; $sql = "INSERT INTO results (";
$sql .= $columns; $sql .= $columns;