Hi, I need someone to fine tune something for me..
Basically what it is it when ever someone gets to 0 days premium and logs into the server with 0 days, the server will lock and allow no more connections untill aujard is reloaded..
Ive been trying my best to add a check into account_login stored procedure to basically check the premium service table if the users has 0 days and if they do to remove them from that table..
Im not too good with procs and sql grammering but I have a general idea of when the check needs to do..
here is my account_login proc.
heres what the grammer needs to be like (like I said I dont know sql grammer to good)Code:USE [KN_online] GO /****** Object: StoredProcedure [dbo].[ACCOUNT_LOGIN] Script Date: 07/15/2008 19:23:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[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 SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays>0 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 exec rundupecheck @accountid exec rundupecheckinn @accountid 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
Please if anyone can edit this to work, Would really make my day..Code:begin check table PREMIUM_SERVICE where StrAccountID = @AccountID and nDays='0' if nDays='0' delete from table PREMIUM_SERVICE where StrAccountID = @AccountID end
Thanks in advance.


Reply With Quote![[Help] Premium 0 Days](http://ragezone.com/hyper728.png)


