SELECT bl.blID, bl.blTitle, bl.blDate, bl.blText, bl.blText2, bl.blCatergory, bl.blLink FROM blog_tbl bl ORDER BY bl.blID DESC
SELECT COUNT(*) as num FROM comment_tbl WHERE cbid = bl.blID AND cStatus = 1
I have the blog table that I'm pulling the posts from and the comment table I'm pulling the comment count. Right now I'm pulling the second query in a loop and it's running for evey post. I want to join the 2 so I only acces the database once and the count will be available on the loop not in it.