Location: PHPKode > projects > Gatito Prediction League > gatito_pred_league/teamleaguetable.php
<?
$team="";
$pos=1;
$count=0;
$table="";
$query=mysql_query("SELECT * FROM teams  WHERE score != '0'  ORDER BY Score DESC LIMIT 10");
while ($row =@ mysql_fetch_array($query)) {
	if ($count==0) {$colour="alt_one";};
	if ($count==1) {$colour='alt_two';};	
	@$table.="<tr class=\"$colour\"><td>$pos</td><td>$row[team]</a></td><td>$row[score]</td></tr>";
	$pos++;
	$count++;
	if ($count>1) {$count=0;}
	
	
};
echo "<h2>Team league table</h2><table>
<tr><td>Pos</td><td>Team</td><td>Score</td></tr>
$table</table>";
?>
Return current item: Gatito Prediction League