Commit 6387c88f authored by S.Holzhauer's avatar S.Holzhauer

queries

parent 9281829f
......@@ -55,7 +55,7 @@ else if ($ID == "IRPS001"){
// select all unhandled (handled = 0) entries in the `activiteiten` table which have passed (EndTime < current $time).
$sql = "SELECT *
FROM `Activiteiten`
WHERE Handled = 0;
WHERE `Handled`='0';
AND EndTime < '$time'
AND DayDate = '$date'";
$result = $conn->query($sql);
......@@ -80,8 +80,8 @@ else if ($ID == "IRPS001"){
if (($Movement == 0) && ($Detected == 1)){
//set handled to 1
$sql = "UPDATE `Activiteiten`
SET Handled = 1
WHERE ActivityID = '$ActivityID'";
SET `Handled`=1
WHERE `ActivityID` = '$ActivityID'";
$result = $conn->query($sql);
//select the details from accounts connected to and details from the elder.
......@@ -156,8 +156,8 @@ else if ($ID == "IRPS001"){
else if (($Movement == 1) && ($Detected == 0)){
//set handled to 1, status stays 0
$sql = "UPDATE `Activiteiten`
SET Handled = 1
WHERE ActivityID = '$ActivityID'";
SET `Handled`=1
WHERE `ActivityID`='$ActivityID'";
$result = $conn->query($sql);
//select the details from accounts connected to and details from the elder.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment