Achmed Posted September 3, 2013 Report Share Posted September 3, 2013 im wanting to remove lines from the db that are not needed for chernarus to make it more simple for me to manage. currently working on a list of unused tid's would this sql syntax work to remove all lines that match the tid 000? (i know 000 is not a valid tid its just an example) DELETE FROM TRADERS_DATA WHERE tid = 000; Link to comment Share on other sites More sharing options...
0 Achmed Posted September 3, 2013 Author Report Share Posted September 3, 2013 also would i need to have it for each tid to remove or can i just create a list like this? DELETE FROM TRADERS_DATA WHERE tid = 000, 001, 002; Link to comment Share on other sites More sharing options...
0 MassAsster Posted September 3, 2013 Report Share Posted September 3, 2013 http://stackoverflow.com/questions/8245107/sql-server-help-deleting-rows-with-a-multiple-where-clause-using-a-sub-query google Link to comment Share on other sites More sharing options...
0 Achmed Posted September 3, 2013 Author Report Share Posted September 3, 2013 yeah i used google but wasnt 100% sure hence why i asked Link to comment Share on other sites More sharing options...
0 fr1nk Posted September 3, 2013 Report Share Posted September 3, 2013 also would i need to have it for each tid to remove or can i just create a list like this? DELETE FROM TRADERS_DATA WHERE tid = 000, 001, 002; I believe this should work: DELETE FROM TRADERS_DATA WHERE tid IN(000,001,002) By the way, you're trying to clean up vendors tied to other map instances, right? Link to comment Share on other sites More sharing options...
0 Achmed Posted September 3, 2013 Author Report Share Posted September 3, 2013 yeah, im just trying to clear it all out as in this DB im only ever gona use cherno. i ended up doing this as could not work it out lol DELETE FROM TRADERS_DATA WHERE tid = '000'; DELETE FROM TRADERS_DATA WHERE tid = '001'; DELETE FROM TRADERS_DATA WHERE tid = '002'; prob not the best way to wright it but it worked to clear it all out. Now i only the tid's in the server_traders.sqf in the db. Link to comment Share on other sites More sharing options...
0 Rayden Posted September 3, 2013 Report Share Posted September 3, 2013 How did you end up with all trader data anyway? Your host automaticly adds them all? Link to comment Share on other sites More sharing options...
0 fr1nk Posted September 3, 2013 Report Share Posted September 3, 2013 yeah, im just trying to clear it all out as in this DB im only ever gona use cherno. i ended up doing this as could not work it out lol DELETE FROM TRADERS_DATA WHERE tid = '000'; DELETE FROM TRADERS_DATA WHERE tid = '001'; DELETE FROM TRADERS_DATA WHERE tid = '002'; prob not the best way to wright it but it worked to clear it all out. Now i only the tid's in the server_traders.sqf in the db. Hmm ok...I know that what I posted above works for simple read queries, haven't tried it for deletes though. I'm interested in trying this too. Will probably give it a go in a couple weeks. Link to comment Share on other sites More sharing options...
0 Achmed Posted September 3, 2013 Author Report Share Posted September 3, 2013 Hmm ok...I know that what I posted above works for simple read queries, haven't tried it for deletes though. I'm interested in trying this too. Will probably give it a go in a couple weeks. How did you end up with all trader data anyway? Your host automaticly adds them all? the DB can be used for every epoch map but as im not planning on moving to another map i have removed all the excess data to make it easyier to mannage your way may work, i tried this before you posted and well when its gone its gone lol so i cant try your way Link to comment Share on other sites More sharing options...
0 vbawol Posted September 3, 2013 Report Share Posted September 3, 2013 All unused tids have been removed from Traders_DATA in the currently released SQL. Link to comment Share on other sites More sharing options...
0 Achmed Posted September 3, 2013 Author Report Share Posted September 3, 2013 All unused tids have been removed from Traders_DATA in the currently released SQL. But the current released SQL supports multiple maps, what i removed is everything not related to chernarus Link to comment Share on other sites More sharing options...
0 Rayden Posted September 4, 2013 Report Share Posted September 4, 2013 You're hosting on Vilayer, by default they will only install the data for the map you are using. At least tis happend for me, I dont have any of the other data. Link to comment Share on other sites More sharing options...
0 Achmed Posted September 4, 2013 Author Report Share Posted September 4, 2013 You're hosting on Vilayer, by default they will only install the data for the map you are using. At least tis happend for me, I dont have any of the other data. i dont wait for Vilayer to update ;) Link to comment Share on other sites More sharing options...
0 Rayden Posted September 4, 2013 Report Share Posted September 4, 2013 Fair enough. :) They are pretty fast though, they already offer the 1.0.2.1 update. Link to comment Share on other sites More sharing options...
0 Achmed Posted September 4, 2013 Author Report Share Posted September 4, 2013 yep they are at times but other times they can be a couple of days.... im just inpatient lol If i wasnt so tired i would have installed it as soon as it was released Link to comment Share on other sites More sharing options...
0 vbawol Posted September 4, 2013 Report Share Posted September 4, 2013 But the current released SQL supports multiple maps, what i removed is everything not related to chernarus All maps now use the same tids. fr1nk 1 Link to comment Share on other sites More sharing options...
0 Achmed Posted September 4, 2013 Author Report Share Posted September 4, 2013 All maps now use the same tids. i know your the man in the know and all that but unless im mistaken i disagree :p in the sql file that shipped with 1.0.2.1 is this line INSERT INTO `trader_items` VALUES(769, 'bulk_ItemTankTrap', 1, 'Wholesale Crates', 'trade_items'); if you search the server_traders.sqf from chernarus 11 for 769 it does not find it. Am i miss understanding how the server_traders.sqf files works or is tid 769 not needed in chernarus 11? Link to comment Share on other sites More sharing options...
0 vbawol Posted September 4, 2013 Report Share Posted September 4, 2013 Those ids are not meant to match up with anything. trader_items table is not used by the game in any way and is used for our tool to edit and add items to the traders. The only table that matters to the game as far as traders goes is the traders_data table you can remove these tables: trader_items server_traders trader_tids However since they are small and not used by the game your net gain will be negligible. Link to comment Share on other sites More sharing options...
0 Achmed Posted September 4, 2013 Author Report Share Posted September 4, 2013 Sorry that was my mistake, i didnt look at what table it was from, just found a random one and searched the server_traiders.sqf file. This is a selection of what i removed that was not in the server_traiders.sqf file DELETE FROM TRADERS_DATA WHERE tid = '504'; DELETE FROM TRADERS_DATA WHERE tid = '505'; DELETE FROM TRADERS_DATA WHERE tid = '506'; DELETE FROM TRADERS_DATA WHERE tid = '507'; DELETE FROM TRADERS_DATA WHERE tid = '511'; DELETE FROM TRADERS_DATA WHERE tid = '513'; DELETE FROM TRADERS_DATA WHERE tid = '514'; DELETE FROM TRADERS_DATA WHERE tid = '515'; DELETE FROM TRADERS_DATA WHERE tid = '516'; DELETE FROM TRADERS_DATA WHERE tid = '518'; Link to comment Share on other sites More sharing options...
Question
Achmed
im wanting to remove lines from the db that are not needed for chernarus to make it more simple for me to manage.
currently working on a list of unused tid's
would this sql syntax work to remove all lines that match the tid 000? (i know 000 is not a valid tid its just an example)
Link to comment
Share on other sites
18 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now