DECLARE @Authority tinyint
DECLARE @Authority2 tinyint
DECLARE @Authority3 tinyint
DECLARE @Currentuser int
delete from currentuser where straccountid = @AccountID
select @Currentuser = count(straccountid) from Currentuser
select @Authority = Authority from [dbo].[userdata] where struserid = (select strcharid1 from Account_Char where strAccountID = @AccountID)
select @Authority2 = Authority from [dbo].[userdata] where struserid = (select strcharid2 from Account_Char where strAccountID = @AccountID)
select @Authority3 = Authority from [dbo].[userdata] where struserid = (select strcharid3 from Account_Char where strAccountID = @AccountID)
if @Authority > 0 or @Authority2 > 0 or @Authority3 > 0 and @Currentuser > 39
Begin
Set @nRet = 0
End
39 sınır