Probleme d'affichage
Posté : 13 nov. 2013, 07:43
Bonjour à tous je suis débutant un vrais et je bloque ,j'ai fait des recherche et bosser dur mais rien et je tourne vers vous
je voudrais savoir pourquoi ça n'affiche que le premier ligne dans ma bdd merci pour votre aide !
voici le code
je voudrais savoir pourquoi ça n'affiche que le premier ligne dans ma bdd merci pour votre aide !
voici le code
$req = mysql_query("SELECT IDECON, YCDAEC,YCMEI, NODOSS, YCMCRD, YCMECR, SUM(YCMEI) AS SOMME FROM apprets
WHERE radical LIKE '%".$_POST['recherche']."%' GROUP BY radical ");
$resultat = mysql_num_rows($req);
if (strlen($_POST["recherche"]) > 0)
{
echo ' ';
if($resultat <=1)
echo''.$resultat.' résultat';
elseif($resultat >1)
echo''.$resultat.' résultats';
echo ' ';
echo'pour [ <span style="color:red;">'.$_POST['recherche'].' </span> ]<br />';
?><table cellspacing="5px" cellpadding="1px"border="1px"<?php
?> CAPTION><strong>Dossier pret client : année 2013</CAPTION></strong><br/><?php
?> <tr><th>IDECON</th><th>YCDAEC</th><th>YCMEI</th><th>NODOSS</th>
<th>YCMCRD</th><th>YCMECR</th></tr><br/><?php
while( $result = mysql_fetch_assoc($req))
{
?>
<tr>
<td><?php echo'<span style="color:black;font-weight:bold">', $result['IDECON'];?></span></td>
<td><?php echo'<span style="color:green;font-weight:bold">', $result['YCDAEC'];?></span></td>
<td><?php echo'<span style="color:red;font-weight:bold">', $result['YCMEI'];?></span></td>
<td><?php echo'<span style="color:brown;font-weight:bold">', $result['NODOSS'];?></span></td>
<td><?php echo'<span style="color:grey;font-weight:bold">', $result['YCMCRD'];?></span></td>
<td><?php echo'<span style="color:orange;font-weight:bold">',$result['YCMECR'];?></span></td>
<?php echo 'total:<span style="color:red;font-weight:bold">', $result['SOMME'];?></span>
</tr>
<?php
}