(来源:visedeg.no)
在您看到的图片上,我有相同值的行。我只想向他们展示一次。行中的值是第 9 周每笔钱的总和。
<?
$result5 = mysql_query("SELECT * FROM Donering WHERE Uke=".$Uke."");
while ($row1 = mysql_fetch_array($result5)){
$nick = $row1['nickid'];
$result6 = mysql_query("SELECT * FROM Donering WHERE nickid=".$nick." and Uke=".$Uke." ");
echo "<table border='1'>
<tr>
<th>Brukernavn</th>
<th>Kr</th>
<th>Uke</th>
</tr>";
while ($row = mysql_fetch_array($result6)) {
$sum2 = $sum2+$row['Penger'];
$DittNick = $row['Nick'];
}
if ($sum2 >= 2500000000) {
$Fargekode = "#00FF00";
}
else {
$Fargekode = "#FF0000";
}
echo "<tr>";
echo "<td>" . $DittNick . "</td>";
echo "<td><font color='".$Fargekode."'>". number_format ($sum2 , 0, ',', '.' ) . " </font></td>";
echo "<td>Uke ".$Uke."</td>";
echo "</tr>";
echo "</table>";
$sum2 = NULL;
}?>