diff --git a/dal/Connection.php b/dal/Connection.php index 910c138..baff6dd 100644 --- a/dal/Connection.php +++ b/dal/Connection.php @@ -28,5 +28,4 @@ return $this->stmt->fetchall(); } } - ?> diff --git a/dal/TaskGateway.php b/dal/TaskGateway.php index dc8ac86..66ede81 100644 --- a/dal/TaskGateway.php +++ b/dal/TaskGateway.php @@ -1,11 +1,11 @@ con->executeQuery($query, array(':id'=> array($t->id,PDO::PARAM_STR), - ':titre'=> array($t->titre,PDO::PARAM_STR), - ':descript'=> array($t->description,PDO::PARAM_STR), - ':priotite'=> array($t->priorite,PDO::PARAM_STR))); + + $this->con->executeQuery($query, array( + ':id'=> array($t->get_id(),PDO::PARAM_STR), + ':titre'=> array($t->get_titre(),PDO::PARAM_STR), + ':descript'=> array($t->get_description(),PDO::PARAM_STR), + ':priotite'=> array($t->get_priorite(),PDO::PARAM_STR) )); } public function update($id_task){ @@ -31,7 +33,7 @@ include_once("..Connection.php"); } # comment ça marche ? - public function Find(array $elements):array{ + public function Find($element, $valeur){ // Find a task by multiple elements // returns the array of found tasks }