From ceae92a88ad12d9c883f9990acf50a1e33e6512e Mon Sep 17 00:00:00 2001 From: "gwenael.planchon" Date: Tue, 21 Nov 2023 17:12:50 +0100 Subject: [PATCH] ajouter deleteScientifique --- project/src/model/gateways/ScientifiqueGateway.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/project/src/model/gateways/ScientifiqueGateway.php b/project/src/model/gateways/ScientifiqueGateway.php index 0893f84..5590529 100755 --- a/project/src/model/gateways/ScientifiqueGateway.php +++ b/project/src/model/gateways/ScientifiqueGateway.php @@ -57,8 +57,15 @@ class ScientifiqueGateway ":id"=>[$sci->getId(),$this->con::PARAM_INT] ]); } + public function deleteScientifique(int $id): bool{ + return $this->con->executeQuery( + "DELETE FROM Scientifique WHERE id=:id;" + ,[ + ":id"=>[$id,$this->con::PARAM_INT] + ]); + } - public function getScientifique(int $id): b { + public function getScientifique(int $id) { $this->con->executeQuery( "SELECT id, nom, prenom, photo, dateNaissance, descriptif, ratioTrouvee, idThematique, idDifficulte, idSexe FROM Scientifique WHERE id=:id;" ,[