Bonjour/soir,
Je viens vers vous car je suis bloqué depuis quelques jours sur un problème, dont je n'arrive pas à trouver la solution sur le net.
En faite je cherche a faire un tableau de ce type via une requête sql.
--Titre1---Titre2----Titre3--------l
l l vert clair l
l vert l vert primaire l
Couleur l l vert foncé l
--------------------------l
l bleu l bleu ciel l
------------------------------------l
pour sa j'ai fait:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <table bgcolor="#BABABA" bordercolor="#FFFFFF" border="1" style="font-size:12px" align="center">'; <tr> <th align="center">Titre1</th> <th align="center">Titre2</th> <th align="center">Titre3</th> </tr> <?php if (mysql_num_rows($sql)>0) { $sql=select organe, count(*) as NBR_ALARME.... echo'<tr>'; echo '<td '.$td1.' align="center">Alarme</td>'; while($row=mysql_fetch_array($sql) { echo '<tr>'; echo '<td '.$td.' align="center" rowspan="'.$row['NBR_ALARME'].'">'.$row['NBR_ALARME'].'</td>'; echo '<td '.$td.' align="center" rowspan="'.$row['NBR_ALARME'].'">'.$row['organe'].'</td>'; echo'</tr>'; } echo'</tr>'; } echo'</table>';
Partager