|
|
|
@ -43,20 +43,19 @@ class TacheGateway
|
|
|
|
|
return $results[0]['oldId'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
public function findByName(string $name): array{
|
|
|
|
|
if (!empty($name)){
|
|
|
|
|
$query = "SELECT * FROM Tache WHERE name=:name";
|
|
|
|
|
$this->con->executeQuery($query, array(':name' => array($name, PDO::PARAM_STR)));
|
|
|
|
|
|
|
|
|
|
public function findById(int $id): ?Tache{
|
|
|
|
|
$tache=null;
|
|
|
|
|
$query = "SELECT * FROM Tache WHERE id=:id";
|
|
|
|
|
$this->con->executeQuery($query, array(':id' => array($id, PDO::PARAM_STR)));
|
|
|
|
|
|
|
|
|
|
$results=$con->getResults();
|
|
|
|
|
foreach ($results as $row ) {
|
|
|
|
|
$tabTaches[]=new Tache($row['id'], $row['name'], $row['content']);
|
|
|
|
|
}
|
|
|
|
|
return $tabTaches;
|
|
|
|
|
$tache=new Tache($row['id'], $row['name'], $row['content']);
|
|
|
|
|
}
|
|
|
|
|
return $tache;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|