Je dispose d'une requête SQL qui me renvoie des informations:
Code : Tout sélectionner
voiture couleur1 porte OPTION
voiture1 rouge 5 clim
voiture1 rouge 5 lecteur cd
voiture1 rouge 5 toit ouvrant
voiture1 rouge 5 gante
voiture1 rouge 5 siege cuir
voiture2 vert 3 clim
voiture2 vert 3 lecteur cd
voiture2 vert 3 toit ouvrant
voiture2 vert 3 gante
voiture2 vert 3 siege cuir
voiture2 vert 3 climVoici mon code php
$societe = "";
$pdv = "";
$nousine = "";
while ( $list = mssql_fetch_array( $query ) ) {
if ($societe != $list["Razon"])
{ echo '<tr><th colspan="10" class="tableth" style="text-align:left; background-color: blue;">' . $list["Razon"].'</th></tr>';
$societe= $list["Razon"];
}
if ($pdv != $list["pdv"]){
echo '<tr><th colspan="10" class="tableth" style="text-align:left; background-color: red;">' . $list["pdv"] . '</th></tr>';
$pdv = $list["pdv"];
}
if ($nousine != $list["NumPedidoFab"]){
echo '<tr>
<th class="tableth" style="text-align:center;">' . $list["NumPedidoFab"] . '</th>
<th>' . $list["marque"] . '</th>
<th>' . $list["modele"] . '</th>
<th>' . $list["version"] . '</th>
<th>' . $list["couleur"] . '</th>
<th>' . $list["interieur"] . '</th>
<th>' . $list["EsKm0"] . '</th>
<th>' . $list["EsDemo"] . '</th>
<th>' . $list["EsDemo"] . '</th>
<th>' . $list["status"] . '</th>
</tr>
';
$nousine = $list["NumPedidoFab"];
}
echo '
<tr ><td colspan ="10">'.$list["kkkk"].'</td>
</tr>';
}
echo '</table>';
Voici le résultat:Tout est comme je veux sauf au niveau des options (transport, packfumeur etc..).Je voudrait arriver à mettre les options sur une ligne (une seul cellule) dans le tableau.
Est-ce possible?
Merci d'avance
guigui69