mysql计算两个字段的积的总和

$sql1 = "SELECT SUM(goods_amount*goods_user_rate) FROM " . $GLOBALS['ecs']->table('buy_info') . $where2;

goods_amount和good_user_rate是数据库的两个字段,请问正确的写法是怎样?

查看回复