Top Online Ranking - required modification
Go to sql & run query
Code:
ALTER TABLE dbo.MEMB_STAT ADD TH int NOT NULL CONSTRAINT DF_MEMB_STAT_TH DEFAULT 0
then open in sql stored procedures &
replace WZ_DISCONNECT_MEMB
(Q: wth are stored procedures ?)
(A: google will tell you)
with new one
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(), TH =
TH+(DATEDIFF(mi,ConnectTM,getdate()))
where memb___id = @memb___id
end
end
GO
additionaly i leave exchangehours from RZ release rewrited by myself to ado, to work with TH mod/column.
Top Voters - required modification
Since i use my own module, i've modified RZ release
(can be found there :
http://forum.ragezone.com/f197/mucore-vote-credits-module-includes-830324/)
to add +1 tvote every vote.
If you use different than rz release, just add in query adding +1 tvote to MEMB_INFO table every vote.
Go to sql & Create column in MEMB_INFO table
Code:
Name = TVote
Data type = int
default 0
Sorry for late reply UnCleanOne, exchange hours works perfectly with TopOnline db modification (TH Column)
So execute query
Code:
ALTER TABLE dbo.MEMB_STAT ADD TH int NOT NULL CONSTRAINT DF_MEMB_STAT_TH DEFAULT 0
on MuOnline (or if you use Me_MuOnline for accounts) database
+ modify Stored procedure WZ_DISCONNECT_MEMB
to this one
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(), TH =
TH+(DATEDIFF(mi,ConnectTM,getdate()))
where memb___id = @memb___id
end
end
GO
Time will be saved by minutes on account, so every 60 min, 1 hour will appear on exchange hours.
HF
Sir Martin if you combine this 2 query what will be the new look of the QUERY?