Bricktop Posted March 27, 2017 Report Share Posted March 27, 2017 I need to delete several hundred abandoned vehicles - I found this in 1051 folder. Not sure if it works - or safe to use. (Don't want players to lose anything) ==Delete all vehicles not touched in 10 days== DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY) AND `Classname` NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest'; Link to comment Share on other sites More sharing options...
Hooty Posted March 27, 2017 Report Share Posted March 27, 2017 I would think so this is mine. Only change is your is 10 mines 7 days DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Classname` NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest'; Bricktop 1 Link to comment Share on other sites More sharing options...
Bricktop Posted March 28, 2017 Author Report Share Posted March 28, 2017 2 hours ago, Hooty said: I would think so this is mine. Only change is your is 10 mines 7 days DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Classname` NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest'; Thanks @Hooty, I did test this (after a db save) and it only removed 3 rows - Guess I'll try 7 days next time. Hooty 1 Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 No problem anytime Link to comment Share on other sites More sharing options...
ViktorReznov Posted June 22, 2017 Report Share Posted June 22, 2017 I use this so i dont accidentally delete vehicles that are mobile banks too DELETE FROM object_data WHERE DATE_SUB(NOW(), INTERVAL 1 HOUR) AND object_data.CharacterID = 0 AND object_data.StorageCoins = 0 the interval is low so to refresh vehicles along the shore to give new players a fighting chance! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now