![]() |
Posting-Counter for special forums
What I need:
I want to show the total count of postings a user has made (already integrated in vb). BUT: I also want to show, how many postings a user has made in - forum 1, 2, 4, 6, 10 and in - forum 3, 5, 7, 8, 9 Is this possible? |
where do you want to show it?
in getinfo or in every post? |
In every post. :)
But if that means to much queries I would be satisfied with getinfo too ;) |
well in every post would mean at least hacking of a lot of files, or really increasing the ammount of queries, so i'd say we shouldn't do this ;)
for getinfo it's nor problem: open member.php find PHP Code:
PHP Code:
|
I think some brackets are missing (the IF is not closed). SQL-Error, if I try it like you wrote. If I add some brackets:
Code:
$forumposts = $DB_site->query_first("SELECT SUM(IF(thread.forumid IN (1, 2, 4, 6, 10), 1, 0)) as first, SUM(IF(thread.forumid IN (3, 5, 7, 8, 9), 1, 0)) as second FROM post LEFT JOIN thread USING(threadid)"); 2973 (48935/44152) First number is the whole count, second the $forumposts[first], last the $forumposts[second] Any guesses? |
That means right now its counting all posts - but it only should count the posts of a specific user.
|
damn, of course you're right :)
i had it in my mind, but forgot to write it down also... also damn brackets ;) use this one: PHP Code:
|
Works!
Great! Big "Thank you" for your quick help! |
:)
good to hear :) you're welcome |
All times are GMT. The time now is 06:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|