コード例 #1
0
ファイル: infos.php プロジェクト: elBichon/freeCitizen
 echo '<section id="voirInfos"><h2>Les dernières nouvelles dans cette ville</h2>';
 $request = $bdd->query('SELECT * FROM freeCitizenInfos WHERE ville = "' . $ville . '" AND date < CURDATE() ORDER BY votes LIMIT 0, 10');
 while ($donnees = $request->fetch(PDO::FETCH_ASSOC)) {
     $infos = new Info($donnees);
     echo '<section id="afficherInfos">';
     echo "identifiant: ";
     echo $infos->id();
     echo "</br>";
     echo "titre: ";
     echo $infos->titre();
     echo "</br>";
     echo "date: ";
     echo $infos->date();
     echo "</br>";
     echo "ville: ";
     echo $infos->ville();
     echo "</br>";
     echo "theme: ";
     echo $infos->theme();
     echo "</br>";
     echo "Auteur: ";
     echo $infos->idAuteur();
     echo "</br>";
     echo "votes: ";
     echo $infos->votes();
     echo "</br>";
     $texte = $infos->texte();
     echo "post: ";
     echo $texte;
     echo "</br>";
     echo "</br>";