I’m trying to write a query to get the total results of a channel with a specific ID and where the authors belong to a specific group id.
I have this.
{exp:query sql="SELECT COUNT(*) AS channel_total_results
FROM
exp_members
INNER JOIN exp_channel_titles ON exp_members.member_id = exp_channel_titles.author_id
WHERE
exp_members.group_id = '{group_id}'
AND
channel_id = '2'
AND
status = 'active'"} {channel_total_results} {/exp:query}I’m not getting anything. Not sure if it’s because of the parsing order or not.