Jump to content
  • 0

SteamID problem


Luna

Question

Hi

I don’t know if this is the right forum, but maybe you can help me.

I have updated our server to Arma 125548 and with that came the famous new Steam ID’s – My problem now is that I run an SQL to update ‘LastUpdated’ in the Object_data, so that players bases remain as long as they log in every 14 days

 

The SQL that I run is:

UPDATE Object_DATA
SET Datestamp = CURRENT_TIMESTAMP

WHERE ObjectUID <> 0

AND CharacterID <> 0
AND ((Inventory IS NULL) OR (Inventory = '[]'))
AND EXISTS (SELECT 1
FROM Character_DATA c
WHERE c.PlayerUID = (SELECT p.PlayerUID
FROM Player_DATA p,
Character_DATA c2
WHERE p.PlayerUID = c2.PlayerUID
AND c2.CharacterID = Object_DATA.CharacterID)
AND c.Alive = 1
AND c.LastLogin > NOW() - INTERVAL 2 WEEK)

 

I run a different Sql to delete.

Now that the character ID has change, I need some kind of SQL to replace old UID’s with new Steam ID’s.
Otherwise bases build with the old ID will get deleted – as far as I can figure our – right ?

My guess is that I need to replace the PlayerUID in the Character_data table 

But this is where I get at bit lost – Do you know a SQL to do this ?
Do you know an argument for not doing this? I can’t decide if there are any bad consequences for this.
I guess if PlayerUID is a primary key this is bad.

I am curries, how did you go about this problem?

My guess is I properly will have to do a lot of manual sql’s – properly something like

 

UPDATE PlayerUID SET x WHERE PlayerUID x

 

Or am I misunderstanding something completely ?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...