1.
select sum(c_topup) as shouru from topup where c_id=會員id2.
select sum(c_topup) as shouru from topup where c_id=會員id
select sum(c_sell) as zhichu from sell where c_id=會員id然後在php用shouru減去zhichu
select sum(c_topup) as shouru from topup where c_id=會員id2.
select sum(c_topup) as shouru from topup where c_id=會員id
select sum(c_sell) as zhichu from sell where c_id=會員id然後在php用shouru減去zhichu
from topup join left sell on topup.cid=sell.cid where topup.cid='$id'