bonjour à tous!!
j'ai un petit soucis avec une boucle while
j'aimerais afficher les articles tous les articles d'une commande dans un tableau mais ça ne m'affiche dans le tableau qu'un article et en dehors du tableau, les autres articles.
j'ai beau regardé mon code je ne vois pas o est ce que j'ai pu fauter![]()
voici mon code :
grrr quelqu'un pourrait il m'expliquer pourquoi ça ne marche pas?
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 <? session_start(); error_reporting(E_ALL); //$identifiant = $_GET['id']; //$_SESSION['identifiant'] = $identifiant; echo "<html> <title>Clients</title> <font size = +2><center>Commande des clients</font></center>"; $select = "SELECT pseudo, mdp FROM client"; $querselect = mysql_query($select); $fetchselect = mysql_fetch_array($querselect); $ident = "SELECT id_cli FROM client WHERE pseudo = '".$fetchselect['pseudo']."'"; $querident = mysql_query($ident); $fetchident = mysql_fetch_array($querident); $com = "SELECT num_com FROM passer WHERE id_cli = '1'"; $quercom = mysql_query($com); while($fetchcom = mysql_fetch_array($quercom)) { $numlivr = "SELECT num_livr FROM lign_livr WHERE num_com = '".$fetchcom[0]."'"; //echo $numlivr."<br>"; $quernumlivr = mysql_query($numlivr); $fetchnumlivr = mysql_fetch_array($quernumlivr); $livr = "SELECT date_livr, etat_livr FROM livraison WHERE num_livr = '".$fetchnumlivr[0]."'"; $querlivr = mysql_query($livr); $fetchlivr = mysql_fetch_array($querlivr); echo "<table border = 1> <tr><td><b><font size =+1>Commande N° ".$fetchcom[0]."</td></tr>"; $ref= "SELECT ref_produit FROM concerner WHERE num_com = '".$fetchcom[0]."'"; $querref = mysql_query($ref); echo "<tr><td><center><b>Ref produit</b></center></td>"; echo "<td><center><b>Designation produit</b></center></td>"; echo"</tr>"; while ($fetchref = mysql_fetch_array($querref)) { $desi = "SELECT designation_produit FROM produit WHERE ref_produit = '".$fetchref[0]."'"; $querdesi = mysql_query($desi); $fetchdesi = mysql_fetch_array($querdesi); echo "<tr><td>".$fetchref[0]."</center></td> <td><center>".$fetchdesi[0]."</center></td> </tr>"; echo "<form method='post' action='donneemodif2.php'>"; echo "<table border = 1> <input type= 'hidden' name='num_livr' value='".$fetchnumlivr['num_livr']."' > <tr><td><center><b>date_livr</b></center></td> <td><input type = 'text' value = '".$fetchlivr[0]."' name = 'date_livr'></td> <td><center><b>etat_livr</b></center></td><br> <td><input type = 'text' value = '".$fetchlivr[1]."' name = 'etat_livr'></td> <td><input type='submit' name= 'sub_form' value= 'modifier' /></td></tr></table></center><br><br> </tr>"; echo "</form>"; } echo "</table>"; }
merci..





Répondre avec citation




Partager