PDA

View Full Version : sql query: unique users per forum?


Sculli
06-12-2006, 08:17 PM
What I would like to do is to determine how many unique users posted to a forum. Unfortunately I have no idea about SQL in the first place. :(

I imagine it could work like this:

select all posts made in forum id 81 from posts_table
select user-id of all posters who made those posts
??? some sort of unique user-id query ???
display the number of unique users

Any help will be greatly appreciated. ;)

Paul M
06-12-2006, 08:35 PM
Try;

SELECT COUNT(post.dateline) AS count
FROM post
LEFT JOIN thread USING (threadid)
WHERE thread.forumid = 81
GROUP BY post.username

Sculli
06-13-2006, 06:20 AM
Awesome, worked like a charm, thank you ever so much. ;)