PDA

View Full Version : help finish this code


squawell
12-24-2001, 01:31 AM
i use this code in member.php but it can't work ~

is it something wrong??


//top views user
$fileviews=$DB_site->query_first('SELECT count(*) AS profileviews FROM user');
$totalprofileviews=$fileviews['profileviews']
$ppfileviews=$DB_site->query_first("SELECT count(*) AS profileviews FROM user WHERE postuserid='$userinfo[userid]'");
$userproviews=$ppfileviews['profileviews']
$totalpercentviews = round(($userproviews / $totalprofileviews) * 100,2);
//end top views user

squawell
12-25-2001, 07:00 AM
any idea??

Admin
12-27-2001, 06:13 AM
//top views user
$fileviews=$DB_site->query_first('SELECT SUM(profileviews) AS profileviews FROM user');
$totalprofileviews=$fileviews['profileviews']
$ppfileviews=$DB_site->query_first("SELECT SUM(profileviews) AS profileviews FROM user WHERE userid='$userinfo[userid]'");
$userproviews=$ppfileviews['profileviews']
$totalpercentviews = round(($userproviews / $totalprofileviews) * 100,2);
//end top views user

squawell
12-27-2001, 07:08 AM
FireFly thank ur help!!

but it still cann't work!!

it show up this message:Parse error

i put that code above this code,is it right??


$jointime = (time() - $userinfo[joindate]) / 86400; // Days Joined

Admin
12-27-2001, 07:11 AM
Ah yes, you are missing a ; after these two:
$totalprofileviews=$fileviews['profileviews']
sorry, didn't check for these errors.

squawell
12-27-2001, 07:14 AM
oh~~~~:D

i see!!

thankz ur help FireFly!! i think it will be work now~~~