Jump to content
  • 0

SQL Events


Triage

Question

Will this event delete walls, and player place object sin epoch?

DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Yes. 

 

It will look at all objects in the table and find all that has a LastUpdated day/time older than 14 days and a DatesStamp older than 24 days and has no inventory. 

As walls and doors and such things generally have no inventory - they will be removed. 

 

What maintenance do, is update the LastUpdated date/time stamp and essentially prevent this code from deleting the items. 

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