executerRequete($sql); return $billets; } public function getBillet($idBillet) { $sql = 'select BIL_ID as id, BIL_DATE as date,' . ' BIL_TITRE as titre, BIL_CONTENU as contenu from t_billet' . ' where BIL_ID=?'; $billet = $this->executerRequete($sql, array($idBillet)); return $billet->fetch(PDO::FETCH_ASSOC); } public function getNombreBillets() { $sql = 'select count(*) as nbBillets from t_billet'; $resultat = $this->executerRequete($sql); $ligne = $resultat->fetch(PDO::FETCH_ASSOC); return $ligne['nbBillets']; } }