Support » How-To and Troubleshooting » SQL query trouble

SQL query trouble

  • I made my problem into a picture to better illustrate what’s happening:


    I want to show recent posts in this format:
    month/day: post title (comment count)

    However my attempts either filter out uncommented posts or don’t count the comments correctly…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Here is my full code… like I said, all I want is a little box that has my latest posts and their comment count (or 0 if no comments)…


    Do some Googling on MySQL outer joins as you want to do an outer join to the comments table.

    Could you please be more specific? I’m rather new to SQL… also, I can’t be the first person to attempt to display posts with their comment counts next to them like that.. but I failed to find anything pointing me how to do this 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SQL query trouble’ is closed to new replies.