ctgwglzc 发表于 2008-12-24 01:02:58

神之祝福的存储,可以参考参考

Premium satmak ve premiumsuzları kontrol etmekCREATE PROCEDURE .

@AccountID varchar(21),
@Password varchar(13),
@nRet smallintOUTPUT

AS

DECLARE @Nation tinyint, @CharNum smallint, @PremyName varchar(21)

-----------------------------------Process Login----------------------------------------
SET @Nation = 0
SET @CharNum = 0
DECLARE @pwd varchar(13)
SET @pwd =null
SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID and idays>0
IF @pwd ISnull
BEGIN

--SET @nRet = 0
SET @nRet = 4
RETURN
END
ELSEIF @pwd <> @Password
BEGIN
--SET @nRet = 0
SET @nRet = 3
RETURN
END
----------------------------Premium Check-----------------------------------------------
select @PremyName = strAccountID from PremiumCheck where strAccountID = @AccountID
IF @PremyName = @AccountID -- Define Premium Account Name Check
BEGIN
SET @nRet = 12 -- Give notice, edit in texts.tbl
RETURN
END

------------------------------Successfull Transaction-----------------------------------
SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF@@ROWCOUNT= 0
BEGIN
SET @nRet = 1
RETURN
END
IF @CharNum = 0
BEGIN
SET @nRet = 1
RETURN
END
ELSE
BEGIN
SET @nRet = 1
RETURN
END

ctgwglzc 发表于 2008-12-24 01:03:37

USE
GO
/****** Object:Table .    Script Date: 09/26/2008 11:07:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE .(
(21) COLLATE Latin1_General_CI_AI NOT NULL
) ON
GO
SET ANSI_PADDING OFF

ctgwglzc 发表于 2009-1-11 23:19:47

旧版内移过去的。需要的自取
页: [1]
查看完整版本: 神之祝福的存储,可以参考参考