aktive fälle mit scannen

This commit is contained in:
Göran Heinemann 2020-03-16 17:26:36 +01:00
parent 10ae53edf4
commit 9b10e763db
1 changed files with 4 additions and 2 deletions

View File

@ -12,14 +12,16 @@ foreach ($pdo->query($sql) as $row){
$amount = $feature->Confirmed;
$cured = $feature->Recovered;
$deaths = $feature->Deaths;
$active = $amount-$deaths-$cured;
$sql = "INSERT INTO `data`(`scan`, `place`, `amount`, `deaths`, `cured`) VALUES (?,?,?,?,?)";
$sql = "INSERT INTO `data`(`scan`, `place`, `amount`, `deaths`, `active`, `cured`) VALUES (?,?,?,?,?,?)";
$stmt = $pdo->prepare($sql);
$stmt->bindParam(1, $row['id']);
$stmt->bindParam(2, $place);
$stmt->bindParam(3, $amount);
$stmt->bindParam(4, $deaths);
$stmt->bindParam(5, $cured);
$stmt->bindParam(5, $active);
$stmt->bindParam(6, $cured);
if (!$stmt->execute()){
var_dump($stmt->errorInfo());
}