1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| $order = $_GET['order'];
if($order == ''){
//valeur par défaut
$order = "nom asc";
}
$requete = "SELECT * FROM stats_joueurs ORDER BY ".$order."";
$resultat = mysql_query ($requete);
print("<table width='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='#FFFFFF' align='center'>");
echo "</tr>";
while ($stats_joueurs =mysql_fetch_object($resultat))
{
print("
<td height='20' class='texte'><div align='left'>$stats_joueurs->nom</div></td>
<td height='20' class='texte'><div align='left'>$stats_joueurs->poste</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->MJ</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->T</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->NM</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->CJ</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->CR</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->A</div></td>
<td height='20' class='texte'><div align='center'>$stats_joueurs->B</div></td>
");
echo "</tr>";
}
print("</table>"); |