1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| try {
$pdo_select = $pdo->prepare($news_fiche_query);
$pdo_select->bindValue( ':newsId', $newsId, PDO::PARAM_INT);
$pdo_select->execute();
$news_fiche_nombre = $pdo_select->rowCount();
$news_fiche_row = $pdo_select->fetch();
} catch (PDOException $e) { echo 'Erreur SQL : '. $e->getMessage().'<br/>'; die(); }
// ---------------------
$newsId = intval($news_fiche_row['news_id']);
$newsTitre = formatage_affichage($news_fiche_row['news_titre']);
$newsContenu = formatage_from_textarea($news_fiche_row['news_contenu']); // textarea
$newsDate = formatage_affichage($news_fiche_row['news_date']); // TIMESTAMP
$newsPublier = intval($news_fiche_row['news_publier']);
// ---------------------
// Photo
$newsPhoto = formatage_affichage($news_fiche_row['news_photo']);
$newsPhotoAvant = $newsPhoto;
$newsPhotoLargeur = intval($news_fiche_row['news_photo_largeur']);
// ---------------------
// Fichier joint
$newsFile = formatage_affichage($news_fiche_row['news_file']);
$newsFileAvant = $newsFile;
// --------------------------------------------------- |
Partager