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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
$requete = "SELECT * FROM `matable` ";
$afficheTab = mysql_query($requete)
<table width="585" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">taille</th>
<?php
while ($listTab= mysql_fetch_assoc($afficheTab)) {?>
<th scope="col"> <?php echo $listTab['taille'];?></th>
<?php }
// On se repositionne sur le premier enregistrement
mysql_data_seek($afficheTab, 0);
// On se replace sur le premier enregistrement
$listTab = mysql_fetch_assoc($afficheTab); // Il faut le relire
?>
</tr>
<tr>
<td>poid</td>
<?php
while ($listTab= mysql_fetch_assoc($afficheTab)) {?>
<td><?php echo $listTab['poid'];?></td>
<?php }
mysql_data_seek($afficheTab, 0);
$listTab = mysql_fetch_assoc($afficheTab);
?>
</tr>
<tr>
<td>freq</td>
<?php
while ($listTab= mysql_fetch_assoc($afficheTab)) {?>
<td><?php echo $listTab['freq'];?></td>
<?php }
mysql_data_seek($afficheTab, 0);
$listTab = mysql_fetch_assoc($afficheTab);
?>
</tr>
</table> |
Partager