Jump to content
  • 0

Hacker spawned 30000+ rocks and buildings


FragZ

Question

I came online and I saw alot of shit appeared between elekktro and Kamyshovo. Thing is, restart didint delete them... They are in the database!!!


Is there  a quick way to delete everything older than yesterday at X time? Using a sql code or something

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)

You can change the interval time to hours etc.

Or try this:

DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 HOUR)

These will delete any and all objects that are (code 1) older than 24 days, second (code snippet 2) will delete anything older than 5 hours. (Hopefully)

Link to comment
Share on other sites

  • 0
DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)

You can change the interval time to hours etc.

Or try this:

DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 HOUR)

These will delete any and all objects that are (code 1) older than 24 days, second (code snippet 2) will delete anything older than 5 hours. (Hopefully)

 

 

I tried with what you said, and it didint delete it. It deleted a lot of rows (3108) but not the ones I wanted gone. I changed the interval to 24 hours and it didint work.

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