Can't tell for sure because I don't have test data to play with but I
think this will give you a count of all the node types that are forum
and then add a count of all the comments ... That way you get an
accurate count even if the original post doesn&#39;t have any comments.<br>
<br>SELECT count(*)<br>
FROM node n <br>
LEFT JOIN comments c&nbsp; <br>
ON n.nid=c.nid <br>
WHERE n.type=&#39;forum&#39; <br><br><div><span class="gmail_quote">On 4/12/07, <b class="gmail_sendername">Morten Holmstrup</b> &lt;<a href="mailto:morten@holmstrups.dk">morten@holmstrups.dk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I&#39;m trying to put together a block that shows &quot;forum statistics&quot; like<br>the ones that typically come with phpbb forums and so on. You know,<br>things like &quot;currently active users&quot;, &quot;number of threads&quot;, &quot;number of
<br>posts&quot;.<br><br>Now, I think I have most of them down now - using a few snippets here<br>and there - but I&#39;m still missing a way to display the complete number<br>of posts in the forums. The trouble is that replies are in reality
<br>comments, and how do you count the comments that are restricted to the<br>forums? This is a small feature, I admit, but I&#39;m weird that way ;)<br><br>Please correct me, if I&#39;m way off - this is my first site with Drupal
<br>(<a href="http://ammenet.dk">ammenet.dk</a>).<br><br>Anyone know, how to accomplish this or just point me in the right<br>direction?<br><br>(I tried the <a href="http://drupal.org">drupal.org</a> forums, but haven&#39;t gotten any replies yet, so I
<br>thought I&#39;d try here)<br><br>thanks!<br>Morten<br><br>--<br>[ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><br>-- <br><br>Kevin Bridges
<br><a href="http://www.kevinbridges.org/">http://www.kevinbridges.org/</a>