From cff69911fb5a49e4cc963fb6b2ae228d25b75398 Mon Sep 17 00:00:00 2001 From: nathan boileau Date: Fri, 25 Nov 2022 18:38:43 +0100 Subject: [PATCH] bd --- WEB/Config/Config.php | 2 +- WEB/Config/Connection.php | 10 +++++++++- WEB/Controller/UserController.php | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/WEB/Config/Config.php b/WEB/Config/Config.php index 49a75096..5968cd14 100644 --- a/WEB/Config/Config.php +++ b/WEB/Config/Config.php @@ -14,7 +14,7 @@ $rep = __DIR__ . '/../'; // $password = 'p'; // SQULITE3 -$dsn = 'sqlite:host=https://sancy.iut.uca.fr/~lafourcade/WEB/Model/; dbname=scripted.db'; +$dsn = 'sqlite:https://sancy.iut.uca.fr/~lafourcade/WEB/Model/scripted.db'; $user = null; $password = null; diff --git a/WEB/Config/Connection.php b/WEB/Config/Connection.php index 3de12928..b8784d36 100644 --- a/WEB/Config/Connection.php +++ b/WEB/Config/Connection.php @@ -15,4 +15,12 @@ class Connection extends PDO { public function getResults(): array { return $this->stmt->fetchall(); } -} \ No newline at end of file +} + +// class Connection extends SQLite3 +// { +// function __construct() +// { +// $this->open('./Model/sripted.db'); +// } +// } \ No newline at end of file diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 764c14c8..c62150b2 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -2,11 +2,14 @@ class UserController { + // function __construct(){ + // $ + // } private Connection $con; function __construct() { global $dsn, $user, $password; - $this->con=new Connection($dsn);; + $this->con=new Connection($dsn); try{ global $rep, $vues, $error; $action=$_REQUEST['action'];