搜索
 找回密码
 加入

送装备体验游戏不注册直接登陆这样实现?

xz7323746 2009-8-29 23:53:58 1196
CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID    varchar(21),
@Password    varchar(13),
@nRet        smallint    OUTPUT

AS

DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

DECLARE @pwd varchar(13)

SET @pwd = null

--Modify By LongYu
DECLARE @count int
select @count = count(*) FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID
IF @count=0
Begin
INSERT INTO TB_USER (strAccountID,strPasswd,strSocNo,idays) VALUES (@AccountID,@Password,@Password,6)
End

SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
IF @pwd IS null
BEGIN
    SET @nRet = 0
            --SET @nRet = 4
    RETURN
END

ELSE IF @pwd <> @Password
BEGIN
    SET @nRet = 0
            --SET @nRet = 3
    RETURN
END

DECLARE @gokhantasci varchar(21)
select @gokhantasci = count(straccountid)  FROM premium_service WHERE strAccountID = @AccountID

if @gokhantasci = 0
begin
insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
end

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 = @Nation+1
            --SET @nRet = 1
    RETURN
END
GO
这个是不用注册那个..具体怎么使用?
还有送新手装备那个怎么用啊?
麻烦高手回答下..本人菜鸟

1 回复

ctgwglzc
2009-8-29 23:53:58
点击查看详情
这一段是自动注册
  1. --Modify By LongYu
  2. DECLARE @count int
  3. select @count = count(*) FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID
  4. IF @count=0
  5. Begin
  6. INSERT INTO TB_USER (strAccountID,strPasswd,strSocNo,idays) VALUES (@AccountID,@Password,@Password,6)
  7. End
复制代码
高级模式
游客