3 tables:
Articles ( ArticleID, ArticleTitle, ArticleText )
Category ( CatID, CatName )
ArtCat ( ArticleID, CatID )
the point here is to be able to be able to assign multiple categories for an article.
well, i want to make a list of categories with the number of articles in that category.
this query works, but it does not return the categories if there are no articles in them.
Code:
select Category.CatID,Category.CatName,count(ArtCat.ArticleID)
from Category,ArtCat where Category.CatID=ArtCat.CatID group by Category.CatID
how can i return categories that don't have articles assigned to them?