I learned in this thread how to find how many posts a user has in a specific forum.
Because of some contests I'm considering in the future, I would like to know how to do a few more.
1. Is there a way to do that one, but for multiple forums? Like say you wanted to know how many posts userid 6 has in in forumids 3, 7, an 9.
After looking at some SQL tutorials, I tried all kinds of variations such as...
SELECT count(*) AS count FROM post LEFT JOIN thread ON (thread.threadid = post.threadid) WHERE thread.forumid=3 OR thread.forumid=7 OR thread.forumid=9 AND post.userid=6
Tried them with AND and such, but never did get it to work.
2. Is there a way to do it for number of threads a user started in an individual forum?
3. Is there a way to make these in a specific date range?[/B] Like how many posts a user had in a specific forum from April 2, 2004 to May 4, 2004 for example.
Thanks in advance!
Because of some contests I'm considering in the future, I would like to know how to do a few more.
1. Is there a way to do that one, but for multiple forums? Like say you wanted to know how many posts userid 6 has in in forumids 3, 7, an 9.
After looking at some SQL tutorials, I tried all kinds of variations such as...
SELECT count(*) AS count FROM post LEFT JOIN thread ON (thread.threadid = post.threadid) WHERE thread.forumid=3 OR thread.forumid=7 OR thread.forumid=9 AND post.userid=6
Tried them with AND and such, but never did get it to work.
2. Is there a way to do it for number of threads a user started in an individual forum?
3. Is there a way to make these in a specific date range?[/B] Like how many posts a user had in a specific forum from April 2, 2004 to May 4, 2004 for example.
Thanks in advance!
Comment