Jump to content
  • 0

Deleting unlocked untouched vehicles


monkeybrain

Question

10 answers to this question

Recommended Posts

  • 0

I guess CharacterID is 0 for these, last_updated > 10 days.

Something like this:

 

DELETE FROM `Object_DATA`
WHERE CharacterID = 0 AND `last_updated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY);

 

I am not sure if other builds could aso have a charID = 0; I do not have any.

Link to comment
Share on other sites

  • 0

I use the following procedure, which looks for unlocked vehicles with nothing in inventory:

BEGIN
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0 AND object_data.Inventory ='[]' AND object_data.Hitpoints <> '[]';
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0 AND object_data.Inventory ='[[[],[]],[[],[]],[[],[]]]' AND object_data.Hitpoints <> '[]';
END
Link to comment
Share on other sites

  • 0

Hrmm that deleted only 3 cars, I have a few hundred cars to delete. How would i modify it to delete vehicles with any inventory

BEGIN
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0;
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0;
END

like this?

 

How could I delete every single unlocked vehicle? (by curiosity)

Link to comment
Share on other sites

  • 0

I use these.

 

Delete all non keyed vehicles.

DELETE FROM Object_DATA WHERE CharacterID = 0

Delete all non keyed and empty inventory vehicles.

DELETE FROM Object_DATA WHERE CharacterID = 0 AND (Inventory = '[[[],[]],[[],[]],[[],[]]]' OR Inventory = '[]')

Delete all vehicles that have not been updated in 5 days, non keyed and has empty inventory.

DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 DAY) AND CharacterID = 0 AND (Inventory = '[[[],[]],[[],[]],[[],[]]]' OR Inventory = '[]')
Link to comment
Share on other sites

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...