- Joined
- Feb 27, 2004
- Messages
- 1,378
- Reaction score
- 50
What this does?
- add a new column in your MEMB_STAT table for total online time for the user EVER!
Does can it count in HOUR, DATE, Minutes?
- yes
Do i need this?
- no idea... it's ur life
What of things i can 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 )
- add a new column in your MEMB_STAT table for total online time for the user EVER!
Does can it count in HOUR, DATE, Minutes?
- yes
Do i need this?
- no idea... it's ur life
What of things i can 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 )
PHP:
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