I have been enjoying vbstats from day one. Yesterday I placed the following important code in my php include
ob_start();
require("/var/www/aboutus/textads/textad.php");
$textads = ob_get_contents();
ob_end_clean();
and vbstats stopped working with the following error:
Warning: Supplied argument is not a valid MySQL result resource in /var/www/haitianforums/vbstats.php on line 555
No Database Selected
The code that I placed is very useful and I need them both.
Any idea why this will conflict with vbstats? Once I remove it, vbstats works.
My entire php include looks like this:
include("vbs_counter.php");
// start - get online users (hack by firefly)
$datecut=time()-$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];
$headeronline=$headerguests+$headerusers;
// end - get online users (hack by firefly)
ob_start();
require("/var/www/aboutus/textads/textad.php");
$textads = ob_get_contents();
ob_end_clean();
|