Hi!I'm doing some things in asp.net and I want to know how to check character is playing game or not in sql server or somewhere else...
I found column: LastLogout in _Char table but it can't solve my issue.
Can someone help!?
Hi!I'm doing some things in asp.net and I want to know how to check character is playing game or not in sql server or somewhere else...
andQuote:
....
select top 1 @LogoutTime = EventTime
from _LogEventChar
where CharID = @CharID and EventTime > @LoginTime and EventID = 6 -- 6: logout
if (@@rowcount = 1)
begin
set @Elapsed_Min = datediff(minute, @LoginTime, @LogoutTime)
if (exists (select * from _TempConnectionLog where CharID = @CharID))
begin
select @TotalPlayMin = TotalPlayMin, @ConCount = ConCount from _TempConnectionLog where CharID = @CharID
set @TotalPlayMin = @TotalPlayMin + @Elapsed_Min
set @ConCount = @ConCount + 1
update _TempConnectionLog Set TotalPlayMin = @TotalPlayMin, ConCount = @ConCount where CharID = @CharID
end
else
begin
insert into _TempConnectionLog values (@CharID, @Elapsed_Min, 0, 1)
end
end
Can someone help please!?Quote:
...
select CharID, EventTime
from _LogEventChar
where EventTime >= @Time_Begin and EventTime <= @Time_End and EventID = 4 -- 4: login
...