View difference between Paste ID: 0yXdHYkn and PwuvHMkp
SHOW: | | - or go back to the newest paste.
1-
<?php
1+
$query = $pdo->prepare("SELECT profile_comments.*, users.username FROM profile_comments, users WHERE users.id = profile_comments.user_id_judge");
2
$query->bindValue();
3-
error_reporting(E_ALL);
3+
4
$profile_comments = $query->fetch();
5-
$pdo = new PDO("mysql:host=localhost;dbname=_fantapc", '_fpcroot', '');
5+
6
7-
$query = $pdo->prepare("SELECT * FROM users WHERE id=:id");
7+
foreach ($pdo->query($profile_comments) as $comments) {
8-
$query->bindValue(":id", $_GET['id'], PDO::PARAM_INT);
8+
  echo "<tr><td>" . $comments['id'] . "</a></td><td>" . $comments['comment'] .  "</td><td>";
9
}