FragZ Posted April 23, 2014 Report Share Posted April 23, 2014 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 More sharing options...
0 Defent Posted April 23, 2014 Report Share Posted April 23, 2014 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 More sharing options...
0 FragZ Posted April 23, 2014 Author Report Share Posted April 23, 2014 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 More sharing options...
0 Defent Posted April 23, 2014 Report Share Posted April 23, 2014 And did you restart the server? Also, please tell me you made a backup of the database. Link to comment Share on other sites More sharing options...
0 FragZ Posted April 23, 2014 Author Report Share Posted April 23, 2014 And did you restart the server? Also, please tell me you made a backup of the database. I have dayz.st I just backed it up using their tool. I think it fixed the problem. Link to comment Share on other sites More sharing options...
Question
FragZ
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now