Hi
I need to get the total cost of all the products in an order by doing
SUM(AR_PrixHT * QUANTITE)
where AR_PrixHT is the product price column and QUANTITE is the product quantity column
here's my entire query
SELECT ID_Commande_Site, POINT_LIVRAISON, PL_INTITULE, SUM(AR_PrixHT * QUANTITE) AS sum_lines FROM comm_en AS t1 LEFT JOIN pl AS t2 ON t2.PL_ID=t1.POINT_LIVRAISON LEFT JOIN comm_li AS t3 WHERE t3.ID_Commande_Site=t1.ID_Commande_Site WHERE CT_Client='BILLJONES' AND DATE_LIVRAISON='2008-07-22' GROUP BY sum_lines
//
//
I'm getting an error that "supplied argument is not a valid MySQL result resource" - does this mean that you can't multiply inside a SUM() ?
thanks