change to SQL
This commit is contained in:
parent
5c8dcb4ca4
commit
8e2e2ecb61
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue