update fa_user u inner join (select sum(num) as total_withdraw_2,user_id from `fa_withdrawal_log` as l where l.status=1 group by l.user_id) as ll on ll.user_id=u.id set u.total_withdraw = ll.total_withdraw_2
网上找了几个都不能解决我的问题,这个比较好一点
update fa_user u inner join (select sum(num) as total_withdraw_2,user_id from `fa_withdrawal_log` as l where l.status=1 group by l.user_id) as ll on ll.user_id=u.id set u.total_withdraw = ll.total_withdraw_2
网上找了几个都不能解决我的问题,这个比较好一点