I noticed that during the registration on shaiya server, goes to table user_master the ip performed in the registration.
Knowing that players' IP can change frequently, I tried to write a procedure, that whenever the player enters the game, the ip is updated to the current IP
This is the code I wrote in an attempt to do this functionality, but it is not working, someone with more experience in sql can help I will enjoy it
IF ( @

Type = 107 )
BEGIN
if exists (Select * from PS_GameLog.dbo.Char_Enter_Leave_Log where UserUID @

ID)
begin
update PS_UserData.dbo.Users_Master
Set UserIP = (select UserIP from PS_GameLog.dbo.Char_Enter_Leave_Log where UserUID @

ID)
WHERE UserUID = @

ID
END
END