Team BlueWater Game Online Tutorial's
Bine ati venit la Team-BlueWater!!Tutorial's 4 all Games!

Total Online Time

View previous topic View next topic Go down

Total Online Time

Post  m4s4cru on Tue Aug 02, 2011 11:54 am

STEPS TO INSTALL

1. NEED TO ADD A NEW COLUMN in MEMB_STAT TABLE
-----
COLUMN NAME: TotalTime
TYPE: int
NOT NULL
DEFAULT 0
-----

2. Change your WZ_DISCONNECT_MEMB ( stored procedure )
Code:

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(), TotalTime = TotalTime+(DATEDIFF(mi,ConnectTM,getdate()))
        where memb___id = @memb___id
            -- TIMEONLINE MOD by john_d
    end
end

GO 
Credits: John_D
avatar
m4s4cru
Admin
Admin

Mesaje : 172
Data de inscriere : 2011-07-29
Varsta : 26

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum