max #6

Merged
PBG2H22AWO merged 3 commits from max into main 2023-12-18 08:24:23 +01:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit e4003ad37d - Show all commits

View File

@ -16,5 +16,10 @@
$result=$this->db->insertEnthaelt($data); $result=$this->db->insertEnthaelt($data);
return json_encode($result); return json_encode($result);
} }
public function deleteEnthaelt($id){
$result=$this->db->deleteEnthaelt($id);
return json_encode($result);
}
} }
?> ?>

View File

@ -48,5 +48,20 @@
return false; return false;
} }
} }
public function deleteEnthaelt($id){
$pdo=$this->linkDB();
$params = array();
$sql = "DELETE FROM Enthaelt WHERE id=:id";
$params[":id"] = $id;
try{
$stmt = $pdo->prepare($sql);
$stmt->execute($params);
return true;
}
catch(\PDOExeption $e){
return false;
}
}
} }
?> ?>