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>";
|
echo "POST Request received.<br>";
|
||||||
|
|
||||||
if(property_exists($entityBodyObject, "id")) {
|
if(property_exists($entityBodyObject, "id")) {
|
||||||
saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
|
if(! ($entityBodyObject->countWatchM + $entityBodyObject->countWatchW + $entityBodyObject->countWatchD === 0)){
|
||||||
echo "<br>Data saved.<br>";
|
saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
|
||||||
|
echo "<br>Data saved.<br>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} elseif($_SERVER['REQUEST_METHOD'] === 'GET') {
|
} elseif($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||||
download_xlsxFile(getFromDatabase());
|
download_xlsxFile(getFromDatabase());
|
||||||
|
|
Loading…
Reference in New Issue