Change results array structure #1

Merged
mattbk merged 8 commits from change-results-array-structure into master 2015-11-01 10:09:39 -06:00
2 changed files with 43 additions and 3 deletions
Showing only changes of commit ab3a6763c0 - Show all commits

View File

@ -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;