1 2 3 4 5 6 7 8 9
|
//on liste les messages
$sql_data_comment = $bdd->prepare('SELECT id, id_user, titre, contenu, pseudo, timestamp, message_cite FROM comment WHERE identifiant_comment= :id_article AND type_comment = :type_comment ORDER BY id DESC LIMIT :premiercontenuAafficher, :nombreDeContenuParPage');
$sql_data_comment->bindValue(':id_article', $id_article, PDO::PARAM_INT);
$sql_data_comment->bindValue(':type_comment', $type_comment, PDO::PARAM_INT);
$sql_data_comment->bindValue(':premiercontenuAafficher', $premiercontenuAafficher, PDO::PARAM_INT);
$sql_data_comment->bindValue(':nombredecontenuparpage', $nombreDeContenuParPage, PDO::PARAM_INT);
$sql_data_comment->execute(); |