You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scripted/WEB/Controller/PartieGateway.php

24 lines
645 B

<?php
require_once("Connection.php");
class PartieGateway
{
private Connection $con;
/**
* @param Connection $con
*/
public function __construct(Connection $con)
{
$this->con = $con;
}
public function insert(string $idPartie){
$query= "INSERT INTO Game VALUES ('$idPartie')";
$this->con->executeQuery($query, array(':idPartie' => array($idPartie, PDO::PARAM_STR)));
}
public function delete(string $idPartie){
$query= "DELETE FROM Game WHERE idGame = $idPartie";
$this->con->executeQuery($query, array(':idPartie' => array($idPartie, PDO::PARAM_STR)));
}
}