- - '. $posts['title_name'] .'
'; - - printPost($posts, 1); - - } else { - - //replies - $get_replies = $dbc->prepare('SELECT * FROM replies WHERE reply_id = ? LIMIT 1'); - $get_replies->bind_param('i', $yeahs['yeah_post']); - $get_replies->execute(); - $replies_result = $get_replies->get_result(); - $replies = $replies_result->fetch_assoc(); - - $get_user_post = $dbc->prepare('SELECT users.* FROM users, posts WHERE users.user_id = posts.post_by_id AND posts.id = ? LIMIT 1'); - $get_user_post->bind_param('i', $replies['reply_post']); - $get_user_post->execute(); - $user_post_result = $get_user_post->get_result(); - $user_post = $user_post_result->fetch_assoc(); - - $get_reply_post = $dbc->prepare('SELECT * FROM posts WHERE id = ? LIMIT 1'); - $get_reply_post->bind_param('i', $replies['reply_post']); - $get_reply_post->execute(); - $reply_post_result = $get_reply_post->get_result(); - $reply_post = $reply_post_result->fetch_assoc(); - - $get_reply_user = $dbc->prepare('SELECT * FROM users WHERE user_id = ? LIMIT 1'); - $get_reply_user->bind_param('i', $replies['reply_by_id']); - $get_reply_user->execute(); - $reply_user_result = $get_reply_user->get_result(); - $reply_user = $reply_user_result->fetch_assoc(); - - echo '- Comment on '. htmlspecialchars($user_post['nickname'], ENT_QUOTES) .'\'s Post -
-'. htmlspecialchars($reply_user['nickname'], ENT_QUOTES) .'
There are no posts with Yeahs yet.
-