0xLeon

Comment Counter per Entry Query

Dec 15th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.21 KB | None | 0 0
  1. SELECT      entry.entryID,
  2.         COUNT(comment.commentID) AS comments
  3. FROM        wcf1_user_guestbook_entry entry
  4. LEFT JOIN   wcf1_user_guestbook_comment comment
  5. ON      (entry.entryID = comment.entryID)
  6. GROUP BY    entry.entryID
Advertisement
Add Comment
Please, Sign In to add comment