Skip to content

Instantly share code, notes, and snippets.

@1stevengrant
Created April 22, 2012 12:39
Show Gist options
  • Save 1stevengrant/2463968 to your computer and use it in GitHub Desktop.
Save 1stevengrant/2463968 to your computer and use it in GitHub Desktop.
count entries with given status/channel in expressionengine
{exp:query sql="
SELECT
COUNT(entry_id) AS total_entry_count
FROM
exp_channel_titles
WHERE
channel_id = 1 AND status = 'open'
"}
{total_entry_count}
{/exp:query}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment