Fix conflict
This commit is contained in:
@@ -38,6 +38,8 @@ $sql = "CREATE TABLE IF NOT EXISTS `stat` (
|
|||||||
$result = $conn->query($sql);
|
$result = $conn->query($sql);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
printf("Errormessage: %s\n", $conn->error);
|
printf("Errormessage: %s\n", $conn->error);
|
||||||
|
} else{
|
||||||
|
print "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -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");
|
$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();
|
$clean_data = array();
|
||||||
foreach($good_columns as $col){
|
foreach($good_columns as $col){
|
||||||
if(isset($data[$col])){
|
if(isset($data[$col])){
|
||||||
|
|||||||
Reference in New Issue
Block a user