I'm using the following select statement to pull in info from a topic and a count of the replies made to that topic. But it doesn't give me a row in the select table for any topics that have no replies ... shouldn't it give a 0 for the COUNT???
Code:SELECT DISTINCT t.ID AS tID, t.topTitle AS tTitle, t.topDescription AS tDesc, t.topCategory AS tCat, COUNT(r.repTopic) AS tPosts FROM topics t INNER JOIN replies r ON r.repTopic = t.ID GROUP BY t.ID, t.topTitle, t.topDescription, t.topCategory


Reply With Quote
Bookmarks