table('buy_info') . $where2;goods_amount和goo">
时间:2021-07-01 10:21:17 帮助过:335人阅读
goods_amount和good_user_rate是数据库的两个字段,请问正确的写法是怎样?
$sql1 = "SELECT SUM(goods_amount*goods_user_rate) FROM " . $GLOBALS['ecs']->table('buy_info') . $where2;
goods_amount和good_user_rate是数据库的两个字段,请问正确的写法是怎样?
select sum(price * num) from table
SELECT SUM(ret) FROM(
SELECT goods_amount*goods_user_rate as ret FROM xxxx
);
我知道这样傻的写法是可以的。