Delete Methode implementiert, nicht getestet
This commit is contained in:
parent
7e034abf8c
commit
e4003ad37d
@ -16,5 +16,10 @@
|
||||
$result=$this->db->insertEnthaelt($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function deleteEnthaelt($id){
|
||||
$result=$this->db->deleteEnthaelt($id);
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
?>
|
@ -48,5 +48,20 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user