nikas455 Posted July 10, 2014 Report Share Posted July 10, 2014 how to remove all cars who stand 7 days without movement? Link to comment Share on other sites More sharing options...
0 cen Posted July 10, 2014 Report Share Posted July 10, 2014 Run this SQL query SELECT * FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Classname` NOT REGEXP 'land|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'; If it returns results that look good, change the SELECT * FROM to DELETE FROM Link to comment Share on other sites More sharing options...
0 nikas455 Posted July 10, 2014 Author Report Share Posted July 10, 2014 Run this SQL query SELECT * FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Classname` NOT REGEXP 'land|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'; If it returns results that look good, change the SELECT * FROM to DELETE FROM and how to clean the machine? inscription what Link to comment Share on other sites More sharing options...
0 cen Posted July 10, 2014 Report Share Posted July 10, 2014 clean the machine? Link to comment Share on other sites More sharing options...
0 nikas455 Posted July 11, 2014 Author Report Share Posted July 11, 2014 clean the machine? yes Link to comment Share on other sites More sharing options...
0 cring0 Posted July 11, 2014 Report Share Posted July 11, 2014 o_O Oh, I think he's asking how to write in the variables or object names to clean up vehicles instead of land|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. Or does that exempt those objects and remove everything else? Link to comment Share on other sites More sharing options...
0 RimBlock Posted July 11, 2014 Report Share Posted July 11, 2014 What Cen proposes is probably the most reasonible way to go about it but just be aware that if someone goes in the vehicles 'gear' or enters and exits the vehicle then IIRC it gets saved to the DB as an update (i.e. it does not have to move to be updated). Link to comment Share on other sites More sharing options...
0 cen Posted July 11, 2014 Report Share Posted July 11, 2014 What Cen proposes is probably the most reasonible way to go about it but just be aware that if someone goes in the vehicles 'gear' or enters and exits the vehicle then IIRC it gets saved to the DB as an update (i.e. it does not have to move to be updated). Correct, any action taken on the vehicle will update the LastUpdated date. Moving it, adding/removing gear, salvaging/repairing, force saving. Link to comment Share on other sites More sharing options...
Question
nikas455
how to remove all cars who stand 7 days without movement?
Link to comment
Share on other sites
7 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