请问这段代码如何给购买总个数赋值?

2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家

通过cart 表就可以统计出来

回答:



$sql = 'SELECT SUM(goods_number) AS number, SUM(goods_price * goods_number) AS amount' .
' FROM ' . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' AND rec_type = '" . CART_GENERAL_GOODS . "'";


统计之后如何赋值?