JohnyMST Posted October 28, 2013 Report Share Posted October 28, 2013 I decided to add some Lumber and Plywood to my neutral traders with below SQL code: INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 50, '[4,"ItemSilverBar",1]', '[3,"ItemSilverBar",1]', 508, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 50, '[4,"ItemSilverBar",1]', '[3,"ItemSilverBar",1]', 530, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 50, '[4,"ItemSilverBar",1]', '[3,"ItemSilverBar",1]', 662, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 50, '[4,"ItemSilverBar",1]', '[3,"ItemSilverBar",1]', 678, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 50, '[4,"ItemSilverBar",1]', '[3,"ItemSilverBar",1]', 680, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 15, '[5,"ItemSilverBar",1]', '[4,"ItemSilverBar",1]', 508, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 50, '[5,"ItemSilverBar",1]', '[4,"ItemSilverBar",1]', 530, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 50, '[5,"ItemSilverBar",1]', '[4,"ItemSilverBar",1]', 662, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 50, '[5,"ItemSilverBar",1]', '[4,"ItemSilverBar",1]', 678, 'trade_items'); INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 50, '[5,"ItemSilverBar",1]', '[4,"ItemSilverBar",1]', 680, 'trade_items'); I now would like to modify the price on them however when I run the query again, navicat says that there is a duplicate entry OK So I go into Traders_Data table and look for PartPlankPack or PartPlywoodPack but there is nothing there...? How can I edit the price on this if it's not displaying in my SQL database? I can still buy it in traders tho... Isn't this strange? Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 28, 2013 Author Report Share Posted October 28, 2013 anyone? Still cant see them in my tables... thanks Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 29, 2013 Author Report Share Posted October 29, 2013 When I run the SQL query again the same as above I get the below answer from Navicat: 1062 - Duplicate entry '["PartPlankPack",1]-508' for key 'item' 1062 - Duplicate entry '["PartPlankPack",1]-530' for key 'item' 1062 - Duplicate entry '["PartPlankPack",1]-662' for key 'item' 1062 - Duplicate entry '["PartPlankPack",1]-678' for key 'item' 1062 - Duplicate entry '["PartPlankPack",1]-680' for key 'item' 1062 - Duplicate entry '["PartPlywoodPack",1]-508' for key 'item' 1062 - Duplicate entry '["PartPlywoodPack",1]-530' for key 'item' 1062 - Duplicate entry '["PartPlywoodPack",1]-662' for key 'item' 1062 - Duplicate entry '["PartPlywoodPack",1]-678' for key 'item' 1062 - Duplicate entry '["PartPlywoodPack",1]-680' for key 'item' I cannot find the Plywood or Plank packs anywhere in my SQL after searching in every single table... Also I cant see entry "1062" so there is no way that there is a duplicate in there... How can I remove these "INVISIBLE" entries from my SQL database? The price is incorrect and it needs to be modified. Please help someone :( Link to comment Share on other sites More sharing options...
0 fr1nk Posted October 29, 2013 Report Share Posted October 29, 2013 Seems like your original insert was missing the display order. Not sure if that's the cause but here's how I added some lumber packs: INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["PartPlankPack",1]','1000','[1,"ItemGoldBar",1]','[1,"ItemSilverBar",1]','0','680','trade_items'); Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 29, 2013 Author Report Share Posted October 29, 2013 But why are they showing in my traders if I entered incorrect lines into navi cat? They are stored somewhere but I cannot locate them anywhere... Hmm I will try your code with the " ` " before and after traders_data. Link to comment Share on other sites More sharing options...
0 fr1nk Posted October 29, 2013 Report Share Posted October 29, 2013 Yeah, I wasn't sure if the order was mandatory or not. Seems like it works fine without it. As for why you can't find any entries in traders_data, I'm not sure. So something like: select * from traders_data where item like '%PartPlankPack%' or select * from traders_data where item like '%PartPlywoodPack%' return no values? Link to comment Share on other sites More sharing options...
0 Revoplay Posted October 29, 2013 Report Share Posted October 29, 2013 Do you use navicat? Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 29, 2013 Author Report Share Posted October 29, 2013 I tried your way now and still the same "Duplicate Entry" message... I ran : select * from traders_data where item like '%PartPlankPack%' and select * from traders_data where item like '%PartPlywoodPack%' and no values returned. Yes Revoplay, I use navicat :) Is there any command to REMOVE specific item from trader within the SQL? Link to comment Share on other sites More sharing options...
0 Axe Cop Posted October 29, 2013 Report Share Posted October 29, 2013 Maybe try this query to show the last 10 entries in traders_data and set the database name also in case navicat has no DB selection you won't get any results but should show an error idk (don't use navicat myself)?? SELECT * FROM epoch.traders_data ORDER BY id DESC LIMIT 10; replace "epoch" with your database name. BTW: You can't insert the same items again, because the item name has to be unique! :) You can also try this tool, if you are not fluent in SQL http://dayzepoch.com/forum/index.php?/topic/2807-private-server-toolscurrently-only-trader/ Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 30, 2013 Author Report Share Posted October 30, 2013 Maybe try this query to show the last 10 entries in traders_data and set the database name also in case navicat has no DB selection you won't get any results but should show an error idk (don't use navicat myself)?? SELECT * FROM epoch.traders_data ORDER BY id DESC LIMIT 10; replace "epoch" with your database name. BTW: You can't insert the same items again, because the item name has to be unique! :) You can also try this tool, if you are not fluent in SQL http://dayzepoch.com/forum/index.php?/topic/2807-private-server-toolscurrently-only-trader/ Hey Axe Cop. I am using this Private Server Tools for Database but it doesn't have Stary Sobor traders... Anyway, In Klen for example, I see my Lumber packs and Plywood in the tool that you mentioned. I can modify the price with no problems but I want to do it in Stary aswell. Since the tool does not have stary parts in it... I'm stuck :P I've just tried your query and here are the results: | 7405 | ["DZ_LargeGunBag_EP1",1] | 50 | [2,"ItemGoldBar10oz",1] | [1,"ItemGoldBar10oz",1] | 0 | 496 | trade_backpacks | | 7404 | ["DZ_LargeGunBag_EP1",1] | 50 | [2,"ItemGoldBar10oz",1] | [1,"ItemGoldBar10oz",1] | 0 | 632 | trade_backpacks | | 7403 | ["DZ_LargeGunBag_EP1",1] | 50 | [2,"ItemGoldBar10oz",1] | [1,"ItemGoldBar10oz",1] | 0 | 538 | trade_backpacks | | 7402 | ["PartPlywoodPack",1] | 50 | [3,"ItemGoldBar",1] | [2,"ItemGoldBar",1] | 0 | 680 | trade_items | | 7401 | ["PartPlywoodPack",1] | 50 | [3,"ItemGoldBar",1] | [2,"ItemGoldBar",1] | 0 | 678 | trade_items | | 7400 | ["PartPlywoodPack",1] | 50 | [3,"ItemGoldBar",1] | [2,"ItemGoldBar",1] | 0 | 662 | trade_items | | 7399 | ["PartPlywoodPack",1] | 50 | [3,"ItemGoldBar",1] | [2,"ItemGoldBar",1] | 0 | 530 | trade_items | | 7398 | ["PartPlywoodPack",1] | 15 | [3,"ItemGoldBar",1] | [2,"ItemGoldBar",1] | 0 | 508 | trade_items | | 7397 | ["PartPlankPack",1] | 50 | [2,"ItemGoldBar",1] | [1,"ItemGoldBar",1] | 0 | 680 | trade_items | | 7396 | ["PartPlankPack",1] | 50 | [2,"ItemGoldBar",1] | [1,"ItemGoldBar",1] | 0 | 678 | trade_items Thanks for help... Link to comment Share on other sites More sharing options...
0 Axe Cop Posted October 30, 2013 Report Share Posted October 30, 2013 Ok since you can't do it yourself (lol) I just checked the IDs of all Building Supplies traders: 508, 530, 662 (see server_traders.sqf in your MPmission), seems like you got them (and 2 more?? maybe removed with latest Epoch patch idk), anyway should work in stary, I don't see any errors from here. Link to comment Share on other sites More sharing options...
0 JohnyMST Posted October 30, 2013 Author Report Share Posted October 30, 2013 Should work in Stary? It does work everywhere. I can buy all I want. The problem is... I can't change the price on it. Well I can if I use this small tool to change prices but of course, it does not have Stary building trader included. This tool is no good for me and SQL rejects my queries due to duplicate data which is not visible... Is there any similar tool which actually has Stary Building supplies? Link to comment Share on other sites More sharing options...
0 Axe Cop Posted October 30, 2013 Report Share Posted October 30, 2013 Oh sorry i missunderstood you then.. If the trader is not showing up maybe you are using an old server_traders.sqf file for the tool? Link to comment Share on other sites More sharing options...
0 Crystal Posted November 2, 2013 Report Share Posted November 2, 2013 I'm stuck as well with your original problem Johny - have you been able to sort the problem out? Link to comment Share on other sites More sharing options...
0 Axe Cop Posted November 2, 2013 Report Share Posted November 2, 2013 Guys that is no prblem, thats a feature you can't add the same items again. Remove them first or just change the price :) It's not that hard to do that without a trader tool, but maybe someone makes a better toold someday.. seems like the epoch community is lazy haha Link to comment Share on other sites More sharing options...
Question
JohnyMST
I decided to add some Lumber and Plywood to my neutral traders with below SQL code:
I now would like to modify the price on them however when I run the query again, navicat says that there is a duplicate entry
OK So I go into Traders_Data table and look for PartPlankPack or PartPlywoodPack but there is nothing there...?
How can I edit the price on this if it's not displaying in my SQL database? I can still buy it in traders tho... Isn't this strange?
Link to comment
Share on other sites
14 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