Jump to content
  • 0

How to Cleanup database of Unused Storage with items


seeker619

Question

4 answers to this question

Recommended Posts

  • 0

First do a :

Select * FROM `object_data` WHERE 
`LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND 
`Classname` LIKE '%storage%'

to make sure you get the right data....then:

DELETE FROM `object_data` WHERE 
`LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND 
`Classname` LIKE '%storage%'

if you are sure its the right data...

This will delete objects not updated 24 days ago and back.

 

ex, from this SQL, the first of my objects has LastUpdated time:  2014-03-10 15:54:44 and last: 2013-12-21 14:01:07,

so if i ran this sql it would delete all objects from 21-Dec till 10-March.

 

Edit:

WOW: sorry, did you mean 'empty' ? Or delete ?..... and when you say unused for X amount, do you mean...any day ? like uh..whenever something is not used for 7 days, clear its inventory and keep the object ?

Cause what you are asking is a bit weird if i get this right....You know, that would erase player's vaults as well.  Everything would be on temporary state then...Every vault, tent etc would just keep items in them for X days....then wiped......thats what you want ?

Link to comment
Share on other sites

  • 0

Never realized anyone responded to me sorry.. im used to seeing an alert on the top right of the screen when a thread i have posts in, has new responses..

 

What i wanted was to DELETE out of my database anything that has not been used in atleast 45 days.  just items that have a storage capacity.  Sheds, Vaults, Tents, Vehicles, Anything that has not been used. 

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
  • Discord

×
×
  • Create New...