Recuperer le resultat d'une requete....
Fermé
trik59
Messages postés
241
Date d'inscription
mardi 9 décembre 2003
Statut
Membre
Dernière intervention
17 mai 2012
-
16 févr. 2005 à 13:59
yannick - 13 févr. 2009 à 15:48
yannick - 13 févr. 2009 à 15:48
A voir également:
- Recuperer le resultat d'une requete....
- Recuperer video youtube - Guide
- Comment récupérer une adresse mail - Guide
- Mon compte facebook est piraté comment le récupérer - Guide
- Recuperer message whatsapp - Guide
- Récupérer photo instagram - Guide
1 réponse
Je pense avoir compris ton problème
Vérifie d'abord le bon positionnement de tes accolades.
Ensuite à la place de sa : while($tab = mysql_fetch_row($resultat))
Met ça : while($row = mysql_fetch_assoc($resultat))
Je pense pour ma part que tu devrais faire :
<div align='center'>
<center><table border='0' width='350' cellspacing='0' cellpadding='0' height='0' style='margin-left: 30px'>
<tr align='center'>
</table>
</div>
<div align='center'>
<center><table border='0' width='380' cellspacing='0' cellpadding='0' height='5' style='margin-left: 20px'>
<tr align='left'>
</tr>
</table>
<table border='1' width='780' bordercolordark='#808080' cellspacing='1' bordercolor='#C0C0C0' bordercolorlight='#C0C0C0' height='30' bgcolor='#FFFFFFF'>
<tr>
<th width='10%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> N° Division </font></strong></th>
<th width='20%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Nom Dividion </font></strong></th>
<th width='15%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Sorte materiel </font></strong></th>
<th width='10%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Statut </font></strong></th>
<th width='25%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Nombre de PC </font></strong></th>
</tr>
<?php
do{
?>
<tr>
<td style='border: 1 outset #000099' width='10%' align='center' checked='false' BGCOLOR='#CCCCCCCC'><font face='Arial' size='2' align ='center'><?php echo $row['tie_tiers']; ?></font></td>
<td style='border: 1 outset #000099' width='20%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['tie_nommar']; ?></font></td>
<td style='border: 1 outset #000099' width='15%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['tie_prenom']; ?></font></td>
<td style='border: 1 outset #000099' width='30%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['com_libcomm']; ?></font></td>
<td style='border: 1 outset #000099' width='25%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['act_mail']; ?></font></td>
</tr>
<?php
}while($row = mysql_fetch_assoc($resultat));
?>
Vérifie d'abord le bon positionnement de tes accolades.
Ensuite à la place de sa : while($tab = mysql_fetch_row($resultat))
Met ça : while($row = mysql_fetch_assoc($resultat))
Je pense pour ma part que tu devrais faire :
<div align='center'>
<center><table border='0' width='350' cellspacing='0' cellpadding='0' height='0' style='margin-left: 30px'>
<tr align='center'>
</table>
</div>
<div align='center'>
<center><table border='0' width='380' cellspacing='0' cellpadding='0' height='5' style='margin-left: 20px'>
<tr align='left'>
</tr>
</table>
<table border='1' width='780' bordercolordark='#808080' cellspacing='1' bordercolor='#C0C0C0' bordercolorlight='#C0C0C0' height='30' bgcolor='#FFFFFFF'>
<tr>
<th width='10%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> N° Division </font></strong></th>
<th width='20%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Nom Dividion </font></strong></th>
<th width='15%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Sorte materiel </font></strong></th>
<th width='10%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Statut </font></strong></th>
<th width='25%' bgcolor='#9999CC'><strong><font face='Arial' size='2'> Nombre de PC </font></strong></th>
</tr>
<?php
do{
?>
<tr>
<td style='border: 1 outset #000099' width='10%' align='center' checked='false' BGCOLOR='#CCCCCCCC'><font face='Arial' size='2' align ='center'><?php echo $row['tie_tiers']; ?></font></td>
<td style='border: 1 outset #000099' width='20%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['tie_nommar']; ?></font></td>
<td style='border: 1 outset #000099' width='15%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['tie_prenom']; ?></font></td>
<td style='border: 1 outset #000099' width='30%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['com_libcomm']; ?></font></td>
<td style='border: 1 outset #000099' width='25%' align='center' checked='false' BGCOLOR='#FFFFCC'><font face='Arial' size='2'><?php echo $row['act_mail']; ?></font></td>
</tr>
<?php
}while($row = mysql_fetch_assoc($resultat));
?>