- Joined
- Apr 8, 2008
- Messages
- 2,465
- Reaction score
- 11,167
What this does?
- add a new column in your MEMB_STAT table for total online time for the user EVER!
Does it can count in HOUR, DATE, Minutes?
- yes
Do I need this?
- no idea, it's your life
What can I do with this?
- well i don't really know but i use as referral system on my test server. referral Total Online TIme = Mu CASH ^^
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 )
Credits: John_D
- add a new column in your MEMB_STAT table for total online time for the user EVER!
Does it can count in HOUR, DATE, Minutes?
- yes
Do I need this?
- no idea, it's your life
What can I do with this?
- well i don't really know but i use as referral system on my test server. referral Total Online TIme = Mu CASH ^^
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