The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Tiny error, need urgent fix :D
I currently have
Code:
<?php error_reporting(7); require('http://xxx/forum/global.php'); $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user'); $numbermembers=number_format($numbersmembers['users']); // get total posts $countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post'); $totalposts=number_format($countposts['posts']); $countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread'); $totalthreads=number_format($countthreads['threads']); ?> Code:
Fatal error: Call to a member function on a non-object in /home/xxx/public_html/test.php on line 5 Please someone help, it used to be so easy with vB2, and now I cant make it work. |
#2
|
||||
|
||||
Well, your trying to use this on vB3? alot of things as changed
global must be refrecned on the server, not as an outside source Try PHP Code:
Try PHP Code:
|
#3
|
||||
|
||||
Thanks! It works.
Altho, it gives me a different total post count that the one shown on my forum's index. What could that be due to? |
#4
|
||||
|
||||
Because the total posts / thread count is done logicaly, not from a stright query.
|
#5
|
||||
|
||||
But which one is correct? And how can I make them both the same?
ZACH! Where are you! Someone tell me how I can make the numbers on both pages match :P |
#6
|
||||
|
||||
Bump!
|
#7
|
||||
|
||||
Ill keep bumping till someone helps :P
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|