Jump to content
  • 0

Error in MySQL syntax


Logan

Question

Was trying to add things into the hero and bandit traders on my new server by an SQL Query rather than copying and replacing things, and I'm getting this error

SQL query:


INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES

('["M4A1_HWS_GL",3]',25,'[2,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,477,'trade_weapons'),
('["M4A1_HWS_GL",3]',25,'[3,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,627,'trade_weapons'),
MySQL said: Documentation

#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 '' at line 4 

Code I'm using

 

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES
 
('["M4A1_HWS_GL",3]',25,'[2,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,477,'trade_weapons'),
('["M4A1_HWS_GL",3]',25,'[3,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,627,'trade_weapons'),
 
Not sure what I'm doing wrong.
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

This is the query I run:

INSERT INTO Traders_DATA (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["CinderBlocks",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 530, 'trade_items');

Changed what I needed to in it, and it worked perfect, thanks!

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