hi ,
i have this sql :
SELECT * , (
xnum * xprice
) AS amount, SUM( xnum * xprice ) AS total
FROM xxbasket
LEFT JOIN xxsubproduct
USING ( xsubproduct_id )
LEFT JOIN xxcolor
USING ( xcolor_id )
WHERE xuserid = '3'
when i use SUM( xnum * xprice ) AS total it's gives me only one row , but when i remove this SUM( xnum * xprice ) it's give me all rows
My question is how can i get sum ? while i need all rows from query ?!