thchazot1 2 years ago
parent 7fce021f8f
commit 3475165b30

@ -2,9 +2,9 @@
$rep = __DIR__ . '/../';
$login="root";
$password="root";
$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite";// chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
$login="thchazot1";
$password="achanger";
$dsn="mysql:host=localhost;dbname=dbthchazot1";// chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
//$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite";
/*
$login="thchazot1";
@ -13,7 +13,7 @@ $dsn="mysql:host=localhost;dbname=dbthchazot1";
*/
$vues['erreur'] = 'Vues/erreur.php';
$vues['addList'] = 'Vues/addList.php';
$vues['addList'] = 'Vues/addListPriv.php';
$vues['addListVis'] = 'Vues/addListVis.php';
$vues['addTask'] = 'Vues/addTask.php';
$vues['modifyTask'] = 'Vues/modifyTask.php';

@ -55,18 +55,18 @@ class MdlListe{
return $tabListe;
}
public function findById(string $id): Liste{
public function findById(string $id): array{
$gate=new ListeGateway($this->con);
$gateTache=new TacheGateway($this->con);
$results=$gate->findById($id);
$tabListe=null;
$tabListe=[];
foreach ($results as $row ) {
$tabTache=[];
$taches=$gateTache->getTacheFromIdList($row['id']);
foreach($taches as $tata){
$tabTache[]=$tata;
}
$tabListe=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache);
$tabListe[]=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache);
}
return $tabListe;
}

Loading…
Cancel
Save