Hi,
I would like to be able to list all the authors with their member ID (members) from a specific channel. I have not been able to find a solution yet. I did have a look at an old post but couldn’t figure out how to add the member ID.
Hopefully some smart people on this forum could help me.
There should be nothing dynamic about this query. Try this:
<ul>
{exp:query sql="
SELECT DISTINCT screen_name AS my_name, member_id AS my_id
FROM exp_channel_titles AS t
INNER JOIN exp_members AS m ON t.author_id = m.member_id
WHERE channel_id = '9'
ORDER BY screen_name ASC
"}
<li>{my_name} ({my_id})</li>
{/exp:query}
</ul>
Alternatively you could probably put that piece of code in a snippet or subtemplate and just embed it.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.