0
select *, sum(price+shipping+paypalfee+storefee) as totalcost, customerpaid as totalrevenue,
(customerpaid - sum(price+shipping+paypalfee+storefee)) as profit,
(((customerpaid - sum(price+shipping+paypalfee+storefee))/customerpaid) * 100.00) as profitpercent
from tblsales
group by orderno having " . $having . "
order by $sort $order limit $offset,$rows"
的查詢工作正常我怎麼能圓profitpercent,計算的字段。如何圓一個計算字段在MySQL查詢
'由'組'? – 2014-11-22 15:41:47
我要改變:) – 2014-11-22 16:00:44