That's weird!
When ever I'm trying to add this on my top of my "phpinclude_start" template, I get a database error.
Add this on top of my phpinclude_start temp
Quote:
if (strpos($_SERVER['PHP_SELF'], 'index.php') == false) {
$datecut = TIMENOW - $vboptions['cookietimeout'];
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$totalonline=$headerguests+$headerusers;
}
|
I get this
Quote:
Database error in vBulletin 3.0.0 Gamma:
Invalid SQL: SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>1075329292
mysql error: Table 'soccerwi_soccerforum.session' doesn't exist
mysql error number: 1146
Date: Wednesday 28th of January 2004 03:49:53 PM
Script: http://www.what ever link I click other then my index page?
Referer: http://www.my forum/index.php?
Username: Me
IP Address: xx.xx.xxx
|
Did I miss out any thing?
Many thanks in advance..