afficher deux tableaux

Eléphanteau du PHP | 29 Messages

27 juin 2008, 12:01

Bonjour,

J'ai un probléme d'affichage dans deux tableaux, en fait je cehrche à afficher le résultat dans deux tableaux separés ,exemple si j'ai ce résultat:



2000-06-18 1.45 1.73 0 2000.07.06-05.23.16 38.3673 22.0742 5 1 .45 6
2000-06-18 1.45 1.73 0 2000.06.18-19.55.52 38.3568 22.0732 8.65 1.73 5
2000-06-18 1.45 1.73 0 2000.06.27-06.40.30 38.3897 22.079 8.39 0 4 8
2000-06-18 1.45 1.73 0 2000.07.12-16.42.39 38.3868 22.0728 5 1.7 4

En regardant le résultat on voit que les 4 premiére colonnes sont les meme c'est juste les 6 autres qui different ce que je veux c'est afficher les 4 premieres colonne dans un tableau sans bien sur qu'il ait repetition et les autres colonnes dans un autre tableau.
Voiçi mon code:
<table border="1" cellspacing="1" cellpadding="1">

 <tr>

<td><b><font size=2 color="#0066cc">Date début</font></b></td>
<td><b><font size=2 color="#0066cc">Date fin</td></font></b>
<td><b><font size=2 color="#0066cc">Nombre d'évenement</td></font></b>
<td><b><font size=2 color="#0066cc">Nom de l'évenement de<br> de réference</td></font></b>
<td><b><font size=2 color="#0066cc">Nombre &nbsp de station de réference</td></font></b>
<td><b><font size=2 color="#0066cc">Latitude</td></font></b>
<td><b><font size=2 color="#0066cc">Longitude</td></font></b>
<td><b><font size=2 color="#0066cc">Profondeur</td></font></b>
<td><b><font size=2 color="#0066cc">Magnitude</td></font></b>
<td><b><font size=2 color="#0066cc">Magnitude min</td></font></b>
<td><b><font size=2 color="#0066cc">Magnitude max</td></font></b>
<td><b><font size=2 color="#0066cc">Q(facteur de qualité)</td></font></b>

<td><b><font size=2 color="#0066cc">Nom de l'évenement</td></font></b>
<td><b><font size=2 color="#0066cc">Latitude de l'évenement</td></font></b>
<td><b><font size=2 color="#0066cc">Longitude de l'évenement</td></font></b>
<td><b><font size=2 color="#0066cc">Profondeur de l'évenement</td></font></b>
<td><b><font size=2 color="#0066cc">Magnitude de l'evenement</td></font></b>
<td><b><font size=2 color="#0066cc">Nombre de station</td></font></b>
<?php


$sql="SELECT *  FROM MULTIPLET, EVENEMENTS WHERE MULTIPLET.num_mult = EVENEMENTS.num_mult AND MULTIPLET.num_mult =". $num_mult ."";
$exec = mysql_query($sql,$cnx)

or die ("Requ�te incorrecte<br />\n". $sql ."<br />\nErreur : ". mysql_error());

/* On v�rifie qu'il y a au moins un r�sultat */
if (mysql_num_rows($exec) > 0)
{ 
    // Si il y a des r�sultats

    while(false != ($rs = mysql_fetch_array($exec)))
    {
?>
  <tr>
    
    <td><?php echo $rs["date_d"]; ?></td>
    <td><?php echo $rs["date_f"]; ?></td>
<td><?php echo $rs["nb_even"]; ?></td>
    <td><?php echo $rs["nom_even_ref"]; ?></td>
    <td><?php echo $rs["nb_sta_ref"]; ?></td>
    <td><?php echo $rs["lat"]; ?></td>
    <td><?php echo $rs["lon"]; ?></td>
<td><?php echo $rs["depth"]; ?></td>
    <td><?php echo $rs["mag"]; ?></td>
<td><?php echo $rs["mag_min"]; ?></td>
<td><?php echo $rs["mag_max"]; ?></td>
    <td><?php echo $rs["Q"]; ?></td>
<td><?php echo $rs["nom_even"]; ?></td>
<td><?php echo $rs["lat_even"]; ?></td>
<td><?php echo $rs["lon_even"]; ?></td>
<td><?php echo $rs["depth_ev"]; ?></td>
<td><?php echo $rs["mag_ev"]; ?></td>
<td><?php echo $rs["nb_sta"]; ?></td>
  </tr>
<?php
    } // Fin instruction while
} 
else 
{
    // Pas de r�sultat trouv�
    echo "Pas de résultat";
}
}
Merci de votre aide[/code]