![]() |
Um...
Wouldn't you just have to get the forumid, then just do something simple like. <?php $query = "select forumid from thread where forumid='theforumidyouchose'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); print "There are $num_rows results in that forum"; ?> Keep it simple, thats the way to do it I think. |
Quote:
Code:
$query=mysql_query("SELECT COUNT(threadid) AS totalthreads FROM thread"); Then you could just grab the total threads by doing something like: Code:
$row=mysql_fetch_array($query); ??? I didnt think of this the first time, because im not very knowledgable on server load / mysql strain.....etc... So i guess i really didnt care :D ~Chris |
<?php
require("forum/admin/config.php3"); $db=mysql_connect($servername,$dbusername,$dbpassw ord); mysql_select_db($dbname); $query=mysql_query("SELECT COUNT(threadid) AS totalthreads FROM thread"); $row=mysql_fetch_array($query); $totalthreads = $row[totalthreads]; echo "$totalthreads total threads"; ?> That code shows the total number of posts on the board, not in a specific forum. |
FORUM LIST W/ TOTAL THREADS ON NON VB PAGE
http://www.extremeforums.com/include..._count.inc.php Usage: Code:
include("/full/path/to/forumlist_with_count.inc.php"); Code:
<?php ~Chris |
Oh yeah,
In my one I left out the MySQL connect code. You'll have to connect to the MySQL and choose the database that vBulletin is in. |
Its killing me how a person can ask a question and people can take is so far off topic, and get so turned around
:mad: |
Quote:
Read this thread a little closer, im not even the one who posted that code |
Roger, I stand corrected. You were correcting someone elses code that had nothing to do with what i asked about in the first place :)
|
Quote:
~Chris |
Quote:
-Thomas |
All times are GMT. The time now is 06:21 AM. |
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:
|