![8O](https://www.developpez.net/forums/images/smilies/icon_eek.gif)
![:roll:](https://www.developpez.net/forums/images/smilies/icon_rolleyes.gif)
tu te tortures les limbes du cerveau pour pas grand chose...
voici un exemple ...
$resultat_requete=mysql_query("SELECT * FROM jeux_videos".$sqlstring) or die(mysql_error());
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 30
| </head>
<body>
<table>
<tr>
<td class="headCol" >Nom <div onclick="tri('nom')" >↑</div><div onclick="tri('nom',1)" >↓</div></td>
<td class="headCol" >Possesseur <div onclick="tri('possesseur')" >↑</div><div onclick="tri('possesseur,1')" >↓</div></td>
<td class="headCol" >Console <div onclick="tri('console')" >↑</div><div onclick="tri('nom',1)" >↓</div></td>
<td class="headCol">Prix <div onclick="tri('prix')" >↑</div><div onclick="tri('prix,1')" >↓</div></td>
<td class="headCol" >Nombre Joueur Max <div onclick="tri('nbre_joueurs_max')" >↑</div><div onclick="tri('nbre_joueurs_max',1)" >↓</div></td>
<td class="headCol" >Commentaires <div onclick="tri('commentaires')" >↑</div><div onclick="tri('commentaires',1)" >↓</div></td>
</tr>
<?php
while($entree = mysql_fetch_array($resultat_requete)) {
?>
<tr>
<td><?php echo $entree['nom'];?></td>
<td><?php echo $entree['possesseur'];?></td>
<td><?php echo $entree['console'];?></td>
<td><?php echo number_format($entree['prix'],2,',','').'';?></td>
<td><?php echo $entree['nbre_joueurs_max'];?></td>
<td><?php echo $entree['commentaires'];?></td>
</tr>
<?php
}
?>
</table>
</body>
</html> |
Partager