Could anyone please help me with this code to sho for eg.
I was trying to make it but got a bit confused
Code:
General Forum (5 Viewing)
$x1=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum'"));
$x2=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='......'"));
$x3=
$xn=
$total = $x1[0]=$x2[0]+$x3[0]+...+$xn[0]
$visit = "($total Viewing)";
echo "...";
//make n $x.. for as many actions exists in forum
$vfc=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Category'"));
$vft=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Topic'"));
$vfo=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum'"));
$cnt=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Creating new topic'"));
$pry=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Posting reply'"));
$fnx=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Forum Index'"));
$nif=$vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0] + $fnx[0];
echo "($nif) :Browsing Forums<br/>";
$vfc=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Category'"));
$vft=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Topic'"));
$vfo=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum'"));
$cnt=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Creating new topic'"));
$pry=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Posting reply'"));
$fnx=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Forum Index'"));
$nif=$vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0] + $fnx[0];
echo "($nif) :Browsing Forums<br/>";
$ucnt_main = mysql_result(mysql_query("SELECT count(id) FROM users WHERE area=1"), 0);
Comment