- Joined
- Feb 4, 2014
- Messages
- 962
- Reaction score
- 36
Hello any body know how to insert condition in this PROCEDURE WZ_DISCONNECT_MEMB?
Scenario: I want to count the time online of player in selected Server # only Example in Server 2.
Column in MEMB_STAT is ServerName and value is (GameServer1 & GameServer2)
I want the online time will count only in GameServer2 which require a condition in procedure what code should i add? (Time Only count if the Account/User is in GameServer2) if in GameServer1 Time will not count if your going to login.
thanks.
Scenario: I want to count the time online of player in selected Server # only Example in Server 2.
Column in MEMB_STAT is ServerName and value is (GameServer1 & GameServer2)
I want the online time will count only in GameServer2 which require a condition in procedure what code should i add? (Time Only count if the Account/User is in GameServer2) if in GameServer1 Time will not count if your going to login.
thanks.
CREATE PROCEDURE WZ_DISCONNECT_MEMB
@memb___id varchar(10)
AS
Begin
set nocount on
Declare @find_id varchar(10)
Declare @ConnectStat tinyint
Set @ConnectStat = 0
Set @find_id = 'NOT'
select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id =
I.memb___id
where I.memb___id = @memb___id
if( @find_id <> 'NOT' )
begin
update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate(), TH =
TH+(DATEDIFF(mi,ConnectTM,getdate()))
where memb___id = @memb___id
end
end
GO
Last edited: