Jump to content
  • 0

Editing existing tables in database with command / query


infiniti

Question

So i know how to add things into my database using the command string i posted below for example

 

INSERT IGNORE INTO traders_data (`item`, `qty`, buy, sell, `tid`, `afile`) VALUES ('["pook_H13_civ",2]', 20, '[6,"ItemGoldBar10oz",1]', '[3,"ItemGoldBar10oz",1]', 519, 'trade_any_vehicle');
INSERT IGNORE INTO traders_data (`item`, `qty`, buy, sell, `tid`, `afile`) VALUES ('["pook_H13_civ_white",2]', 20, '[6,"ItemGoldBar10oz",1]', '[3,"ItemGoldBar10oz",1]', 519, 'trade_any_vehicle');
INSERT IGNORE INTO traders_data (`item`, `qty`, buy, sell, `tid`, `afile`) VALUES ('["pook_H13_civ_slate",2]', 20, '[6,"ItemGoldBar10oz",1]', '[3,"ItemGoldBar10oz",1]', 519, 'trade_any_vehicle');
INSERT IGNORE INTO traders_data (`item`, `qty`, buy, sell, `tid`, `afile`) VALUES ('["pook_H13_civ_yellow",2]', 20, '[6,"ItemGoldBar10oz",1]', '[3,"ItemGoldBar10oz",1]', 519, 'trade_any_vehicle');
INSERT IGNORE INTO traders_data (`item`, `qty`, buy, sell, `tid`, `afile`) VALUES ('["pook_H13_civ_black",2]', 20, '[6,"ItemGoldBar10oz",1]', '[3,"ItemGoldBar10oz",1]', 519, 'trade_any_vehicle');
 
thats what i use to insert the pook choppers into the aircraft dealer
 
what i was wondering was if it was possible to do a string like that that i can paste in as a query which will alter existing values in the database.
 
say i didnt want to manually have to find the plot pole in the tables and then edit the value of how much it costs. Is there a way to use a string like i did above which will adjust an existing item/value in the tables.
 
i can then just copy paste the queries to easily change values of things. 
Link to comment
Share on other sites

2 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...