Beispiel #1
0
function fnLogClimateData($intSensorID, $intValue)
{
    $sqlClimateData = "INSERT INTO tblsensordata(intSensorID, intDataValue, strDateTime) VALUES(" . $intSensorID . ", " . $intValue . ", '" . dtStamp() . "')";
    $linkcd = mysqli_connect('localhost', 'root', '', 'climatecontroldata');
    $ClimateDataIns = mysqli_query($linkcd, $sqlClimateData, MYSQLI_USE_RESULT);
    mysqli_close($linkcd);
}
Beispiel #2
0
        $GNEretVal = $rsNewEvents['intThresholdEventID'];
        #$GNEretVal = $rsNewEvents[$i];
        #$retVal2 = $rsNewEvents[$i];
        echo "<br>KKK i= " . $i;
        echo "<br>GNEretVal = " . $GNEretVal;
        #$i = $i + 1;
        echo "<br>detected and dispatched {$rsNewEvents}=" . $GNEretVal;
        $booClearFlagTrue = fnClearNewFlag($GNEretVal);
        $intThresholdEventID = $GNEretVal;
        #$intThresholdEventID = $GNEretVal;
        fnFlagEventInProccess($intThresholdEventID, 0);
        echo "<br> fnFixClimate(" . $intThresholdEventID . ");";
        echo "<br>fnFlagEventInProccess(" . $intThresholdEventID . ",0)";
        $retVal1 = fnFixClimate($intThresholdEventID);
        #$i++;
        echo "<br> " . $intThresholdEventID;
    }
    #mysqli_next_result($linkgnea);
    echo "OIUAUHSDSIUADHADSD";
    echo "KKKKKKKKKKKKKOOOOOOOOOOO";
    #AAA111
}
if (!isset($_GET["evtid"]) or $_GET["evtid"] <= 0) {
    fnGetNewEvents();
} else {
    #Code below clears new flag from eventthreshold table
    echo "<br>intThreholdEventID = " . $intThresholdEventID . "<br>Date/Time = " . dtStamp();
    $flagsCleared = fnClearNewFlag($intThresholdEventID);
    echo "<br> Attempting to Clear EventID booIsNew Flag on EventID" . $intThresholdEventID . "<br>" . $flagsCleared . " flags were reported cleared.";
    # $strFixStatus = fnFixClimate($intThresholdEventID);
}