no caso da procedure que conta o OnlineTime, se eu quizer colocar pra marcar tbm no OnlineTimeDay, OnlineTimeWeek, OnlineTimeMonth teria que modificar o que aqui: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go --//************************************************** ********************** --// Reviewed and Optimized by X-Team --// [Somente usuários registrados podem vem os links. ] --//************************************************** ********************** ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB] @memb___id varchar(10) AS Begin set nocount on Declare @find_id varchar(10) Declare @ConnectStat tinyint Declare @con_tm DATETIME Set @ConnectStat = 0 Set @find_id = 'NOT' select @find_id = S.memb___id, @con_tm = S.ConnectTM 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 --ATUALIZA status da conta UPDATE MEMB_STAT SET ConnectStat = @ConnectStat, DisconnectTM = getdate(), OnlineTime = OnlineTime+(DATEDIFF(mi,@con_tm,getdate())) WHERE memb___id = @memb___id --ATUALIZA minutos online do char UPDATE Character SET OnlineTime = OnlineTime+(DATEDIFF(mi,@con_tm,getdate())) FROM Character as c INNER JOIN AccountCharacter as ac ON c.Name = ac.GameIDC WHERE c.accountid = @memb___id end end
Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)
Regras do Fórum