I have the following code on a clients site which is showing the amount of images within a given category along with a category image… which is working great..
({exp:query sql="SELECT count(exp_category_posts.entry_id ) AS post_count FROM exp_category_posts WHERE exp_category_posts.cat_id = {category_id}"}{post_count}{/exp:query} images in this category)But im trying to limit this count to only the entries that have status=“open” to which i think i have the right code.. but just cant seem to put it in the right place to get it to work… any ideas anyone?
exp_weblog_titles.status='open'