squawell
12-11-2001, 11:35 AM
i make this code
$boardviews = $DB_site->query_first("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = number_format($boardviews[totalviews]);
$countviews=$DB_site->query_first("SELECT count(views) AS views FROM thread WHERE postuserid='$bbuserinfo[userid]'");
$myviews=number_format($countviews[views]);
$percentviews = round(($myviews / $totalviews) * 100,2);
but it always show up the same number~~
what's wrong??
$boardviews = $DB_site->query_first("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = number_format($boardviews[totalviews]);
$countviews=$DB_site->query_first("SELECT count(views) AS views FROM thread WHERE postuserid='$bbuserinfo[userid]'");
$myviews=number_format($countviews[views]);
$percentviews = round(($myviews / $totalviews) * 100,2);
but it always show up the same number~~
what's wrong??