Quote:
Originally Posted by ahmedzizoa1
Hello i will create table with this values ( username . log in time . IP )
but i need procedures when any account log in game this info register at this table every time and not delete
like when i enter with account then log off
then log in again register again and the last not delete
|
its only an example you have to edit by your own work
IF @

D = 6 or @

D = 9)
BEGIN
DECLARE @

JID int @

varchar(max) @

IP varchar(max)
select @

JID = UserJID from SRO_VT_SHARD.dbo._User where CharID = @

D
Set @

= (select AccountID from SRO_VT_SHARD.dbo._AccountJID where JID = @

JID)
SELECT @

IP = [reg_ip] FROM SRO_VT_ACCOUNT.dbo.TB_User WHERE StrUserID = @

DELETE FROM SRO_VT_SHARDLOG.dbo._Userlog Where Username = @

IF NOT EXISTS (SELECT * FROM SRO_VT_SHARDLOG.dbo._Userlog WHERE [Username] = @

or [IP] = @

IP)
BEGIN
INSERT INTO [SRO_VT_SHARDLOG].[dbo].[_Userlog] ([UserName],[Ip],[Date]) VALUES @

@

IP,GETDATE())
END
END