BetterDeadThanZed Posted September 18, 2013 Report Share Posted September 18, 2013 Is there an SQL query I can run that will delete all vehicles that haven't been "touched" in X number of days? Link to comment Share on other sites More sharing options...
0 LimpNoodle Posted October 10, 2013 Report Share Posted October 10, 2013 Installed Epoch on another Server, different host and have the same deal. That is 3 servers with the same. ALTER TABLE `character_data` ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; ALTER TABLE `object_data` ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; This just simply does not work on any of the 3. It updates when I access a vehicle, but also updates all vehicles on server restart. :( Link to comment Share on other sites More sharing options...
0 WEB11 Posted January 26, 2014 Report Share Posted January 26, 2014 Would something like this work? UPDATE object_data SET Datestamp = CURRENT_TIMESTAMP WHERE ObjectUID <> 0 AND CharacterID <> 0 AND ((Inventory IS NULL) OR (Inventory = '[]')) AND EXISTS (SELECT 1 FROM character_data c WHERE c.PlayerUID = (SELECT p.PlayerUID FROM player_data p, character_data c2 WHERE p.PlayerUID = c2.PlayerUID AND c2.CharacterID = object_data.CharacterID) AND c.Alive = 1 AND c.LastLogin > NOW() - INTERVAL 1 MONTH) Then let the .ini do the cleanup instead of setting it to -1 Link to comment Share on other sites More sharing options...
Question
BetterDeadThanZed
Is there an SQL query I can run that will delete all vehicles that haven't been "touched" in X number of days?
Link to comment
Share on other sites
27 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now