J'ai un problème avec une boucle. J'aimerais afficher un tableau avec des info qui sont sur ma BD.
J'ai dans la table 'chrono' deux entrés. Pourtant, seule la première s'affiche et se répète à l'infini.
Ma table 'chrono' se compose de 6 champs : id, date, pilote, temps_seconde, temps_milliseconde, voiture .
J'aimerais savoir pourquoi seule la première entré s'affiche et pourquoi elle continue à l'infini.
voici mon code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Chrono</title> </head> <body> <table border="1" width="500px"> <tr> <td width="25%" align="center" bgcolor="#FFFF00">DATE</td> <td width="25%" align="center" bgcolor="#FFFF00">PILOTE</td> <td width="25%" align="center" bgcolor="#FFFF00">TEMPS</td> <td width="25%" align="center" bgcolor="#FFFF00">VOITURE</td> </tr> <?php $host="ftpperso.free.fr"; $user="latitemumu"; $mdp="*********"; $connection=mysql_connect($host,$user,$mdp); $db="latitemumu"; mysql_select_db($db,$connection); $req_classement="SELECT * from chrono ORDER BY 'temps_seconde' and 'temps_milliseconde'"; $res_classement=mysql_query($req_classement,$connection); $classement=mysql_fetch_row($res_classement); while ($classement) { ?> <tr> <td width="25%"><?php echo $classement[1]; ?></td> <td width="25%"><?php echo $classement[2]; ?></td> <td width="25%"><?php echo $classement[3].'"'.$classement[4]; ?></td> <td width="25%" align="center"><img src="img/voiture/<? echo $classement[5]; ?>" /></td> </tr> <?php } ?> </table> </body> </html>
Merci d'avance


