如何让MUONLINE自动添加VIP

之前都是使用网站注册时自动加VIP,后来发现其实有更简单的方法

USE MuOnline
IF EXISTS (SELECT name FROM sysobjects
WHERE name = '增加VIP')
DROP TRIGGER 增加VIP
GO

CREATE TRIGGER 增加VIP ON dbo.memb_info AFTER INSERT
AS
BEGIN
DECLARE
@Char varchar(10)
SELECT @Char = memb___id FROM INSERTED
UPDATE MEMB_INFO SET 
AccountLevel = 1,      
 AccountExpireDate = GETDATE() + 9999  
 WHERE memb___id = @Char
END

相关文章

发表新评论