| SET QUOTED_IDENTIFIER ON GO
 SET ANSI_NULLS ON
 GO
 
 
 CREATE PROCEDURE [dbo].[i_1oirtataz]
 @AccountID        varchar(21),
 @Password        varchar(13),
 @nRet                smallint        OUTPUT,
 @strReason         varchar(255)  output
 AS
 
 
 DECLARE @Nation tinyint, @CharNum smallint, @AccountCh varchar(21)
 DECLARE @CompareValue varchar(13)
 SET @Nation = 0
 SET @CharNum = 0
 
 DECLARE @pwd varchar(13)
 
 SET @CompareValue = null
 SET @pwd = null
 SET @AccountCh = null
 set @strReason=null
 
 SELECT @pwd = strPasswd, @strReason=reasons FROM [dbo].[Black_USER] WHERE strAccountID = @AccountID
 IF @pwd = @Password
 BEGIN
 SET @nRet = 5
 --SET @nRet = 5 被封号
 RETURN
 END
 
 
 SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID  and  idays=6
 IF @pwd IS null
 BEGIN
 SET @nRet = 9
 --SET @nRet = 9 没有注册
 RETURN
 END
 
 ELSE IF @pwd <> @Password
 BEGIN
 SET @nRet = 10
 --SET @nRet = 10 密码不对
 RETURN
 END
 
 
 SELECT @pwd = strPasswd FROM [dbo].[CheckUSERs] WHERE strAccountID = @AccountID
 IF @pwd IS null
 BEGIN
 Insert into CheckUSERs values( @AccountID, @Password)
 delete from CURRENTUSER where strAccountID = @AccountID
 SET @nRet = 8
 --SET @nRet = 8
 RETURN
 END
 ELSE IF @pwd = @Password
 BEGIN
 delete from CURRENTUSER where strAccountID = @AccountID
 delete from CheckUSERs where strAccountID = @AccountID
 Insert into CheckUSERs values( @AccountID, @Password)
 SET @nRet = 8
 --SET @nRet = 8
 RETURN
 END
 GO
 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO
 |