Bonjours,
j'ai un problème d'affichage sur 2 requettes les donnée quel me renvoit ne sont pas complete
voilà le resultat que sa me met :
et j'ai eu ce résultat avec ce code:Pays_____Prestataire____V G_________Commandes____C.A___________Mmc
_______________________100683_______11512________571055 euro___49.61
________1st____________829__________11___________1459 euro_____ 132.64
________adc____________119
________adw ___________23232
________aff____________212776
________bly____________8_____________23__________1879 euro_______81.68
________cm_____________222
________him____________2073
________StV____________1399
________tes ___________1
________xxx____________9
donc si quelqu'un arrive a voir l'erreur ce serai cool car la j'en peu plus merci
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 <?php include("application_top.php");?> <html> <head> </head> <body> <table border="1"> <tr style="text-align: center; background-color:#FFAD5B; font-weight:bold;"> <th> Pays </th> <th> Prestataire </th> <th> V G </th> <th> Commandes </th> <th> C.A </th> <th> Mmc </th> </tr> <?php // REQUETE 1 : $query = "SELECT substr(customers_from, 1, 3) AS Origin, COUNT(*) AS effectif_vg FROM customers GROUP BY Origin "; $result_vg = mysql_query($query) ; while ($row = mysql_fetch_array($result_vg)) { ?> <tr> <td style="background-color:#CCCCCC;"> </td> <td style="text-align:center;"> <?php echo $row['Origin'] ?> </td> <td style="text-align:center;"> <?php echo $row['effectif_vg'] ?> </td> <?php // REQUETE 2 : $query_produit = " SELECT substr(customers_from, 1, 3) AS Origin, COUNT(DISTINCT cu.customers_id) AS effectif, count(co.commandes_status) AS command, AVG(co.commandes_montant) AS Mmc FROM customers cu INNER JOIN commandes co ON cu.customers_id=co.customers_id WHERE co.commandes_status='1' and customers_from='".$row['Origin']."' GROUP BY Origin "; $result = mysql_query($query_produit) ; while ($row = mysql_fetch_array($result)) { ?> <td style="text-align:center;"> <?php echo $row['command'] ?> </td> <td style="text-align:center;"> <?php echo round($row['command']*$row['Mmc']) ?> euro </td> <td style="text-align:center;"> <?php echo round($row['Mmc'] ,2) ?> </td> <?php } } ?> </table> </body> </html>
Partager