bonjour
je suis en train de faire un petit truc sur oscommerce pour gerer les points fidéliter.
j'ai bien mon resultats voulu mais me manque un truc c'est l'addition des resulats.
voila ce que je voudrais savoir c commenbt faire pour addtionne les $strPrix[$j]
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 $strRequete = "SELECT final_price,products_tax,products_quantity from orders_products WHERE orders_id = $voir"; $strResultat = mysql_query($strRequete) or die ('Erreur SQL !<br>'.mysql_error()); $intCompteur=1; while ($strLigne = mysql_fetch_array($strResultat)) { $intType_price = $strLigne['final_price']; $intType_tax = $strLigne['products_tax']; $intType_quantity = $strLigne['products_quantity']; $j=0; $j++; $strPrix[$j]= ($intType_price*$intType_quantity+(($intType_price*$intType_quantity)*$intType_tax/100)); echo' '.$strPrix[$j].'<br>';// donc la ca m'affiche mon resulat, mais si j'ai plusieur objet ca me donne plusieus resulats que je voudrais additionner }
merci
Fabien
Partager