SupremeHorse Posted December 27, 2013 Report Share Posted December 27, 2013 Host: VilayerWanting to clear up unused vehicles (Untouched within 14 days)Tested some queries such as refuel all vehicles and fix all vehicles but nothing worked, even after restart.Please help :/Used Navicat Lite and HeidiSQLMySQL > Epoch > Queries Link to comment Share on other sites More sharing options...
0 d0t Posted December 27, 2013 Report Share Posted December 27, 2013 Host: VilayerWanting to clear up unused vehicles (Untouched within 14 days)Tested some queries such as refuel all vehicles and fix all vehicles but nothing worked, even after restart.Please help :/Used Navicat Lite and HeidiSQLMySQL > Epoch > Queries Do you get a error? What is the queries you try to run? Link to comment Share on other sites More sharing options...
0 SupremeHorse Posted December 27, 2013 Author Report Share Posted December 27, 2013 Do you get a error? What is the queries you try to run? No i don't get any errors. All execute successfully. No difference in-game though :s Tried the following: - Fix all vehicles (No refuel) UPDATE instance_vehicle SET damage=0, parts = '[]' - Fix and refuel all vehicles UPDATE instance_vehicle SET fuel=1, damage=0, parts = '[]' - Refuel all vehicles UPDATE instance_vehicle SET fuel=1 - Remove vehicles untouched within 30 days DELETE FROM instance_vehicle WHERE DATE(`last_updated`) < CURDATE() - INTERVAL 30 DAY Link to comment Share on other sites More sharing options...
0 cen Posted December 27, 2013 Report Share Posted December 27, 2013 Epoch database doesn't use instance_vehicle. Try this: update object_data set hitpoints='[]',fuel=1,damage=0 WHERE `Classname` NOT IN ('VaultStorage','LockboxStorage','VaultStorageLocked','LockboxStorageLocked','WoodShack_DZ','StorageShed_DZ','TentStorageDomed','TentStorageDomed2','TentStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL; SupremeHorse 1 Link to comment Share on other sites More sharing options...
0 SupremeHorse Posted December 27, 2013 Author Report Share Posted December 27, 2013 Thanks for that! Ill try it tomorrow morning :) Any lists of queries for epoch someone can link me to or post here? Link to comment Share on other sites More sharing options...
0 SupremeHorse Posted December 28, 2013 Author Report Share Posted December 28, 2013 It worked! Thank you! Now i'm trying to set up a schedule so that objects untouched within 30 days are removed every 14 days, but i keep getting this error:[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON SCHEDULE EVERY 14 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FR' at line 1 The code im using is this:ON SCHEDULE EVERY 14 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY)I'm following this guide, just changing the intervals:http://dayzepoch.com/wiki/index.php/Server_Installation_Instructions_Extended Please help :) Link to comment Share on other sites More sharing options...
0 cen Posted December 28, 2013 Report Share Posted December 28, 2013 You need to set the number of cleanup days in your hiveext.ini file: [Objects] ;Which table should the objects be stored and fetched from ? Table = object_data ;Negative values will disable this feature ;0 means that ALL empty placed items will be deleted every server restart ;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted CleanupPlacedAfterDays = 21 Link to comment Share on other sites More sharing options...
0 SupremeHorse Posted December 29, 2013 Author Report Share Posted December 29, 2013 I want the server to remove the objects regardless of it's inventory. Works if i run it myself but i wanna schedule it to run every 14 days. Link to comment Share on other sites More sharing options...
0 Gank Posted December 29, 2013 Report Share Posted December 29, 2013 Dang it! I stoped the server I went to phpmyadmin and went to trade data, with Trade Data open, I ran the script with the SQL box clear and it went green (no error). I did this with the server off than started it. At the wholesaler and this man haz no C.Boxes as he did not yesterday. i'm going try it again Link to comment Share on other sites More sharing options...
0 Gank Posted December 29, 2013 Report Share Posted December 29, 2013 do you use vent or one them talk programs? I would even donate to your sever for helping me if we could maybe have you come in with me set a couple things? I hate to admit it but I do not have a clue how to set up a schedule. Haha, this simple script is giving me all these problems. If your up for it i'll love have you do that, just let meh know:) Link to comment Share on other sites More sharing options...
0 Gank Posted December 29, 2013 Report Share Posted December 29, 2013 Sorry for the wall :( just found out i'm in the wrong place, doh! Link to comment Share on other sites More sharing options...
Question
SupremeHorse
Host: Vilayer
Wanting to clear up unused vehicles (Untouched within 14 days)
Tested some queries such as refuel all vehicles and fix all vehicles but nothing worked, even after restart.
Please help :/
Used Navicat Lite and HeidiSQL
MySQL > Epoch > Queries
Link to comment
Share on other sites
10 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