TA的每日心情 | 衰 2017-7-25 22:12 |
---|
签到天数: 1 天 [LV.1]新手冒险

牙牙学语
     
|
DELIMITER $
Create PROCEDURE recharge (PName varchar(100),gold int(10))
BEGIN
set @AName=CONCAT('1-',PName);
set @AccountID=(select AccountID from avatar where rolename=@AName);
update avatar set Diamond=Diamond+gold where RoleName=@AName;
update account set RechargeTotal=RechargeTotal+gold where AccountID=@AccountID;
end$
delimiter ; |
|