From 87e612e6f980134379f62b22328d6c541683c971 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Mon, 26 Sep 2022 10:53:45 +0200 Subject: [PATCH] debug --- gestion/saisieCandidats.php | 10 +++++++++- include/db.class.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gestion/saisieCandidats.php b/gestion/saisieCandidats.php index f39089c..06ff106 100644 --- a/gestion/saisieCandidats.php +++ b/gestion/saisieCandidats.php @@ -35,7 +35,15 @@ if (!empty($idCandidat)) choixVote($path, $idVotation); }else { - print('

Nouveau candidat pour le vote'); + $votationName = $db->queryVotationName($idVotation); + $voteName = $db->queryVoteName($idVote); + $candidatsList = $db->queryCandidatsList($idVotation, $idVote); + print('

Nouveau candidat pour le vote ' . $voteName . ' de la votation ' . $votationName . '

'); + print('Liste des candidats'); + foreach($candidatsList as $line) + { + print($line["libelle"] . EOLH); + } candidatsForm($path, $idVotation, $idVote); } print(' diff --git a/include/db.class.php b/include/db.class.php index bb95c20..e14c21a 100644 --- a/include/db.class.php +++ b/include/db.class.php @@ -141,7 +141,7 @@ class dbcore { $query = "SELECT * FROM liste_candidats WHERE idVotation='" . $idVotation . "' AND idVote='" . $idVote . "'"; $this->query($query); - $candidats = $this->result->fetch_all(); + $candidats = $this->result->fetch_all(MYSQL_ASSOC); return $candidats; } }