Update user_master every time the player enters the game, update to current ip (Help

09/09/2019 08:39 ShaiyaIwanttolearn#1
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 :)

09/09/2019 16:40 ShaiyaIwanttolearn#2
Quote:
Originally Posted by failpvper View Post


when writing actiontype procedures, my humble suggestion is not to select data from another log when it's already present in the ActionLog, in the same row.

also, you didn't need the set statement in this case. the text1 column has the ip in it when actiontype 107 is logged, and the varchar data type is already configured for that column, which is the same data type for an ip address. you only needed to select the needed columns, and set the variables in the select statement with the where clause.
thanks, it worked perfectly, and helped me a lot in my SQL learning, I still have a lot to learn