SHARE
TWEET

Query

a guest Jun 20th, 2019 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   $postsQuery = $conn->query("
  2.   SELECT
  3.   posts.post_id,
  4.   posts.user_id,
  5.   posts.post_title,
  6.   posts.post_content
  7.   COUNT (posts.post_id) as likes
  8.   FROM posts
  9.   LEFT JOIN post_likes ON posts.post_id = post_likes.post_id
  10.   WHERE posts.post_id=$postID
  11.   GROUP BY post_likes.post_id
  12.   ");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top