diff --git a/dbsetup.php b/dbsetup.php index f92b7b3..ac2a90f 100644 --- a/dbsetup.php +++ b/dbsetup.php @@ -38,6 +38,8 @@ $sql = "CREATE TABLE IF NOT EXISTS `stat` ( $result = $conn->query($sql); if (!$result) { printf("Errormessage: %s\n", $conn->error); +} else{ + print "success"; } ?> \ No newline at end of file diff --git a/scrape.php b/scrape.php index 4218b1c..1b45a8a 100644 --- a/scrape.php +++ b/scrape.php @@ -19,6 +19,7 @@ if (!$conn) { $good_columns = array("coolLowerSetpLimit","coolNextPeriod","coolSetpoint","coolUpperSetptLimit","deviceID","dispTemperature","displayedUnits","heatLowerSetptLimit","heatNextPeriod","heatSetpoint","heatUpperSetptLimit","isInVacationHoldMode","schedCoolSp","schedHeatSp","scheduleCapable","statusCool","statusHeat","systemSwitchPosition","weatherHumidity","weatherPhrase","weatherTemperature"); + $clean_data = array(); foreach($good_columns as $col){ if(isset($data[$col])){