Jump to content
  • 0

SQL Problem. Not showing entries as it should be


JohnyMST

Question

Hi,

I'm having trouble with my SQL entries. I'd like to clean everything up but not sure where to start.

 

First of all, I found that I have many "VIL" entries in the traders. What are they? How do I get rid of them?

 

Then again my problem:
For example, I have placed metal_panel_kit item into my traders however I am not able to find in the tables using NaviCat

How come can I buy such item but cannot see the entry for it in my SQL?

Does anyone have an idea what the hell is wrong with this?

 

The same is with all custom added items. Cinder Blocks, Mortars, Wood etc.
How Do I edit it if I can't see these entries?

 

What is the command to remove specific items?
Anything at all that will help me will do...

 

Thanks

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello my friend! :D

 

About the "VIL" entries, they were deleted with the last epoch update, I usually just import the new trader_items, traders_data and trader_tids tables and drop my own before evcery Epoch patch. You should have just the addition for your own server in an extra file to import those again after the patch (like changes to the traders or new weapons, vehicles etc).

 

You can try and remove all "VIL_"-entries from the database with something like:

DELETE FROM dayz_epoch.traders_data WHERE item LIKE '["VIL\_%';

which will delete all entries starting with "["VIL_", maybe do a SELECT beforte and see what items would be affected (change DELETE to SELECT *).

Be careful not to delete the wrong items, always do database backup first there is no undo in most cases (DON'T delete with "%VIL%'", that will delete all vehicles containing ciVILian as well)! :)

 

To find all other items it's always the same just search in a specified column like "item" for a text with the "like" SQL-operator, e.g.:

SELECT * FROM dayz_epoch.traders_data WHERE item LIKE '%M4%'; 

This will display all items with the text "M4" somewhere. The "%" in SQL is a wildcard for any text, maybe get some basic knowledge in SQL queries, the basics should be fast to learn.

Link to comment
Share on other sites

  • 0

Hello my friend! :D

 

About the "VIL" entries, they were deleted with the last epoch update, I usually just import the new trader_items, traders_data and trader_tids tables and drop my own before evcery Epoch patch. You should have just the addition for your own server in an extra file to import those again after the patch (like changes to the traders or new weapons, vehicles etc).

 

You can try and remove all "VIL_"-entries from the database with something like:

DELETE FROM dayz_epoch.traders_data WHERE item LIKE '["VIL\_%';

which will delete all entries starting with "["VIL_", maybe do a SELECT beforte and see what items would be affected (change DELETE to SELECT *).

Be careful not to delete the wrong items, always do database backup first there is no undo in most cases (DON'T delete with "%VIL%'", that will delete all vehicles containing ciVILian as well)! :)

 

To find all other items it's always the same just search in a specified column like "item" for a text with the "like" SQL-operator, e.g.:

SELECT * FROM dayz_epoch.traders_data WHERE item LIKE '%M4%'; 

This will display all items with the text "M4" somewhere. The "%" in SQL is a wildcard for any text, maybe get some basic knowledge in SQL queries, the basics should be fast to learn.

 

Just wanted to say thanks! Reposted this thread on another that was similar! Got my mind in the right track, for vehicle deletion of VIL cars, just use:

DELETE FROM object_data WHERE classname LIKE 'VIL%';

Thanks again! 

Link to comment
Share on other sites

  • 0

Just wanted to say thanks! Reposted this thread on another that was similar! Got my mind in the right track, for vehicle deletion of VIL cars, just use:

DELETE FROM object_data WHERE classname LIKE 'VIL%';

Thanks again! 

Actually there is no need to delete existing vehicles, just use the UPDATE queries from the current epoch patch to change them into similar cars: https://github.com/vbawol/DayZ-Epoch/blob/master/Server%20Files/mysql/epoch.sql#L2660-L2732

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