From fb79f7bbc1df4925af4db3b9f7b8d43932ad6118 Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Fri, 25 Nov 2022 14:24:13 +0100 Subject: [PATCH] delete source gateway --- gatewaySources.php | 8 ++++++++ index.php | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gatewaySources.php b/gatewaySources.php index 13a5dbc..34fa007 100644 --- a/gatewaySources.php +++ b/gatewaySources.php @@ -15,6 +15,14 @@ class GatewaySources ) ); } + + public function deleteSources($idSource) + { + $query = "delete from sources where :idsource;"; + $this->con->executeQuery($query, array(':idsource' => array($idSource, PDO::PARAM_INT) + ) + ); + } } ?> diff --git a/index.php b/index.php index 08bdbe8..86202b0 100644 --- a/index.php +++ b/index.php @@ -23,8 +23,6 @@ $sources = new GatewaySources($con); $gateAdmin->addAdmin(new admin("toto","tata")); - - $sources->addSources(new sources($link)); /*$results=$gateNews->getNews();