|
|
|
@ -47,6 +47,15 @@ class ArticleGateway
|
|
|
|
|
$this->con->executeQuery($query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function removeAllArticleFromFlux(int $idFlux){
|
|
|
|
|
try {
|
|
|
|
|
$query = 'DELETE FROM Article WHERE Provenance = :idFlux;';
|
|
|
|
|
$this->con->executeQuery($query, array(':idFlux' => array($idFlux, PDO::PARAM_INT)));
|
|
|
|
|
}catch(\PDOException $p){
|
|
|
|
|
throw new Exception("Data of flux is not delete.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findArticleByFlux(int $flux){
|
|
|
|
|
$query = 'SELECT * FROM Article WHERE provenance = :flux;';
|
|
|
|
|
$this->con->executeQuery($query, array(':flux' => array($flux, PDO::PARAM_INT)));
|
|
|
|
|