Bonjour j'ai fait une requête pour un affichage d'information venant d'une base par contre je n'arrive pas à le faire affiche en colonne
Pour info dans la base j'ai des dates avec plusieurs créneaux horaires
22/10/2013 HD:10h30 HF:11h30
22/10/2013 HD:18h30 HF:20h30
22/10/2013 HD:21h30 HF:22h00
23/10/2013 HD:10h30 HF:11h30
23/10/2013 HD:18h30 HF:20h30
25/10/2013 HD:10h30 HF:11h30
25/10/2013 HD:18h30 HF:20h30
........................
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
23
24
25
26
27
28
29
30 $date_entre = new DateTime($_POST['date_debut_input']); $date_entre->modify('-1 day'); echo "<table><tr>"; for ($i = 1; $i <= 4; $i++) { $date_entre2=$date_entre->modify('+1 day'); echo "<td>".($date_entre2->format('Y-m-j'))."</td>"; $date_heure2[]=$date_entre2->format('Y-m-j'); $deta_heure_unique = array_unique($date_heure2); }; foreach ($deta_heure_unique as $key ) { // echo "<td>".$key."</td><td>"; echo "<tr>"; $select1= "SELECT SQL_CALC_FOUND_ROWS t1.*, t3.* FROM agents t1 LEFT join heures t3 on(t1.GAIA = t3.GAIA) where ".$compreq." and date_heures='".$key."' order by date_heures DESC"; //where $compreq $date_entre order by heure_fin $reponse1 = mysql_query($select1)or die (mysql_error()); while($donne1=mysql_fetch_array($reponse1)){ echo "<td> HD:".$donne1['heure_debut']." HF:".$donne1['heure_fin']."</br>"; } echo "</td></tr>"; } echo "</tr></table>"; ?> </div>
Partager