Hey,
I'm crafting a SQL query that should return the category names as number of items in the categories (listings.* where listings.category = categories.id). The query works fine when there are items, but when there are 0 items in the category, the category isn't returned.
Any help?Code:select categories.name as name , count(listings.id) as count from categories , listings where listings.category = categories.id group by categories.name









Bookmarks