Het betreffende stukje script:
<?php
$query = "
SELECT
username AS username,
status AS status,
werknemers AS werknemers,
vertrouwen AS vertrouwen,
category AS category,
score AS score,
pand AS pand,
lvl AS lvl
FROM users
ORDER BY score DESC
";
$highscores_run = mysql_query($query) or die(mysql_error());
while($highscores = mysql_fetch_object($highscores_run)){
$calc = (($highscores->status * 3) * ($highscores->vertrouwen * 2) + ($highscores->status * 3) * ($highscores->werknemers / 6) + ($highscores->vertrouwen * 2) * ($highscores->werknemers / 8)) * ($highscores->pand * $highscores->lvl);
$update = "UPDATE `users` SET `score` = '".$calc."' WHERE username='".$highscores->username."'";
$update_run = mysql_query($update) or die(mysql_error());
echo'
<tr>
<td width="50" class="highscore-table"></td>
<td width="100" class="highscore-table">'.$highscores->username.'</td>
<td class="highscore-table">'.$highscores->status.'%</td>
<td class="highscore-table">'.$highscores->werknemers.'</td>
<td class="highscore-table">'.$highscores->vertrouwen.'%</td>
<td class="highscore-table">'.$highscores->category.'</td>
<td class="highscore-table"><a href="">PM</a></td>
<td class="highscore-table"><a href="">Profiel</a></td>
</tr>
';
}
?>