Strike what I said above. It would still need queries. You would have to store the counters somewhere. Is this code for moderators or just admins?
If it's for admins, you will need two queries. 1 to get the count of all threads where visible=0 and one for attachments where visible=0.
However, if it's for mods, you would need to do a bit more. You would need to get the forumid of those threads or attachments and do an ismod check.
|