diff --git a/WEB/Controller/Connection.php b/WEB/Config/Connection.php similarity index 100% rename from WEB/Controller/Connection.php rename to WEB/Config/Connection.php diff --git a/WEB/Controller/Validation.php b/WEB/Config/Validation.php similarity index 100% rename from WEB/Controller/Validation.php rename to WEB/Config/Validation.php diff --git a/WEB/Controller/EnigmeGateway.php b/WEB/Controller/EnigmeGateway.php index 7046f8d1..2b1c8de3 100644 --- a/WEB/Controller/EnigmeGateway.php +++ b/WEB/Controller/EnigmeGateway.php @@ -11,20 +11,18 @@ class EnigmeGateway public function __construct(Connection $con) { $this->con = $con; - }/* + } public function insert(string $idEnigme, string $admin, string $enonce, string $aide,string $rappel,string $solution,string $test,float $tempsDeResolution){ - $query="INSERT INTO Enigme VALUES ('$idEnigme','$admin','$enonce','$aide','$rappel','$solution','$test','$tempsDeResolution')"; + $query="INSERT INTO Enigme VALUES (:idEnigme,:admin,:enonce,:aide,:rappel,:solution,:test,:tempsDeResolution)"; $this->con->executeQuery($query,array( - ':idEnigme' => array($idEnigme, PDO::PARAM_STR)) - ':admin' => array($admin, PDO::PARAM_STR) - ':enonce' => array($admin, PDO::PARAM_STR) - ':aide'=> array($admin, PDO::PARAM_STR) - ':rappel'=> array($admin, PDO::PARAM_STR) - ':solution'=> array($admin, PDO::PARAM_STR) - ':test'=> array($admin, PDO::PARAM_STR) - => array($admin, PDO::PARAM_STR) - )) + ':idEnigme' => array($idEnigme, PDO::PARAM_STR), + ':admin' => array($admin, PDO::PARAM_STR), + ':enonce' => array($enonce, PDO::PARAM_STR), + ':aide'=> array($aide, PDO::PARAM_STR), + ':rappel'=> array($rappel, PDO::PARAM_STR), + ':solution'=> array($solution, PDO::PARAM_STR), + ':test'=> array($tempsDeResolution, PDO::PARAM_STR) + )); } -*/ } ?> \ No newline at end of file