+
+
+
+ prepare('SELECT * FROM cmw_forum_like WHERE id_answer = :id_answer AND Appreciation = 1');
+ $like->bindParam(':id_answer', $answerd['id'], PDO::PARAM_INT);
+ $like->execute();
+ $countlike = $like->rowCount();
+ if($countlike > 0)
+ {
+ if($countlike >= 3)
+ {
+ $ilike = 0;
+ echo '
';
+ while($likedata = $like->fetch())
+ {
+ echo ' ';
+ echo $likedata['pseudo'];
+ echo ',';
+ $ilike++;
+ }
+ echo ' aiment ça ';
+ ?>
Liste
+ 1 && $countlike < 3)
+ {
+ echo '
';
+ while($likedata = $like->fetch())
+ {
+ echo ' ';
+ echo $likedata['pseudo'];
+ echo ',';
+ }
+ echo ' aiment ça
';
+ }
+ elseif($countlike == 1)
+ {
+ echo '
';
+ $likedata = $like->fetch();
+ echo ' ';
+ echo $likedata['pseudo'];
+ echo ' aime ça
';
+ }
+ }
+ $dislike = $bddConnection->prepare('SELECT * FROM cmw_forum_like WHERE id_answer = :id_answer AND Appreciation = 2');
+ $dislike->bindParam(':id_answer', $answerd['id'], PDO::PARAM_INT);
+ $dislike->execute();
+ $countdislike = $dislike->rowCount();
+ if($countdislike > 0)
+ {
+ if($countdislike > 3)
+ {
+ $idislike = 0;
+ echo '
';
+ while($dislikedata = $dislike->fetch())
+ {
+ echo ' ';
+ echo $dislikedata['pseudo'];
+ echo ',';
+ $idislike++;
+ }
+ echo ' n\'aiment ça';
+ ?>
Liste
+ 1 AND $countdislike < 3)
+ {
+ echo '
';
+ while($dislikedata = $dislike->fetch())
+ {
+ echo ' ';
+ echo $dislikedata['pseudo'];
+ echo ',';
+ }
+ echo ' n\'aiment ça
';
+ }
+ elseif($countdislike == 1)
+ {
+ $dislikedata = $dislike->fetch();
+ echo '
';
+ echo $dislikedata['pseudo'];
+ echo ' n\'aime pas ça
';
+ }
+ }
+ $test_vote = $bddConnection->prepare('SELECT * FROM cmw_forum_like WHERE pseudo = :pseudo AND id_answer = :id_answer');
+ $test_vote->execute(array(
+ 'pseudo' => $_Joueur_['pseudo'],
+ 'id_answer' => $answerd['id']
+ ));
+ $test_votedata = $test_vote->fetch();
+ if(empty($test_votedata['id']) && $_Joueur_['pseudo'] != $answerd['pseudo'])
+ {
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+