Jump to content
  • 0

how to remove all cars who stand 7 days without movement?


nikas455

Question

7 answers to this question

Recommended Posts

  • 0

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

  • 0

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

  • 0

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

  • 0

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

  • 0

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

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