Hi All-
I have searched for an answer to this, but haven’t found any previous questions that were answered.
I am running a list of categories in a parent category with the number of entries posted beside them with this code:
<ul class="four_column">
{exp:query sql="SELECT count(exp_category_posts.entry_id) AS post_count,
exp_category_posts.cat_id, exp_categories.cat_name
FROM exp_categories, exp_category_posts, exp_weblog_titles
WHERE exp_category_posts.cat_id = exp_categories.cat_id
AND parent_id='318'
AND exp_weblog_titles.weblog_id = '9'
AND exp_weblog_titles.entry_id = exp_category_posts.entry_id
GROUP BY exp_categories.cat_name"}
<li><a href="http://{path=site/fw_index4_listings}C{cat_id}/">{cat_name}</a> ({post_count})</li>
{/exp:query}
</ul>It works beautifully on returning categories that have entries, but I want it to also return categories that have no entries with a zero. Can anyone point me in the right direction here?
Thanks a million!