The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
how I can post the total number of threads in a certain forum on a non-vb page??
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Here is a start. I have no idea how to do the query. Can anyone help??
<?php // Set this to the Forum ID to display $forum = 20; require("forum/admin/config.php3"); $db=mysql_connect($servername,$dbusername,$dbpassw ord); mysql_select_db($dbname); $forumtitle=htmlspecialchars($forum[title]); $numberthreads=$forum[threadcount]; <A HREF="forumdisplay.php3?forumid=$forum">$forumtitl e</A> has $numberthreads Threads. ?> |
|
#3
|
|||
|
|||
|
90 Views and no one wants to help...
|
|
#4
|
|||
|
|||
|
It's not that we don't WANT to help, many of us don't know HOW to help.
|
|
#5
|
|||
|
|||
|
Quote:
http://www.vbulletin.com/forum/showt...?threadid=2658 |
|
#6
|
|||
|
|||
|
here's what the thread had further down
Code:
<?php
require("/full/path/to/admin/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "select * from thread";
$resultlatest = mysql_query($query,$db);
$num = mysql_num_rows($resultlatest);
echo "<FONT FACE=\"Verdana, Arial, Helvetica, sans-serif\" SIZE=\"2\">There are currently <b>$num</b> threads on the forums.</font>";
?>
|
|
#7
|
|||
|
|||
|
Code:
$query = "select * from thread"; Code:
SELECT COUNT(*) FROM thread -Chris [Edited by Chris Schreiber on 09-08-2000 at 04:58 PM] |
|
#8
|
|||
|
|||
|
chris i tried SELECT COUNT(*) FROM thread
and it displayed my total thread count = 1 ? |
|
#9
|
|||
|
|||
|
Quote:
![]() I can't check this now, but I will take a look at this later tonight.... this is valid SQL, I even checked here to make sure: http://www.mysql.com/documentation/m...=Counting_rows -Chris |
|
#10
|
|||
|
|||
|
|
![]() |
|
|