change to SQL

This commit is contained in:
schrom01 2023-02-15 17:00:11 +01:00
parent 5c8dcb4ca4
commit 8e2e2ecb61
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
echo "POST Request received.<br>";
if(property_exists($entityBodyObject, "id")) {
saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
echo "<br>Data saved.<br>";
if(! ($entityBodyObject->countWatchM + $entityBodyObject->countWatchW + $entityBodyObject->countWatchD === 0)){
saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
echo "<br>Data saved.<br>";
}
}
} elseif($_SERVER['REQUEST_METHOD'] === 'GET') {
download_xlsxFile(getFromDatabase());