Close, but adding that to a posts query always gives me a SQL error...
One of the displays I run is actually a hack (welcome message on non-vb page) - however, the index.php for vb has the following:
Code:
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
This one isn't as critical because people don't really seem to watch it closely, but for the purposes of this hack I'd like to have the stats not show here either.
I've tried doing something similar to your threads solution with your code (for a hack) or something like this (for index.php):
Code:
$totalposts=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE forumid!=X");
But then I get a SQL error:
Invalid SQL: SELECT count(*) AS posts FROM post WHERE forumid!=50
mysql error: Unknown column 'forumid' in 'where clause'
Actually I wonder if I'm taking the wrong road with this whole thing and should be hitting this from the other side of things.. what I mean is, instead of allowing vb to continue to count posts from this forum and masking them in displays - wouldn't there be a way to just not count them at the time some counter is increased?
I'd be happy either way I guess.. I just always get a SQL error when adding the term forumid!=XX to the post count line(s) regardless of it being a hack or being index.php...