Mysql Error 1064

Asked

Viewed 54 times

0

in the Insert below I get the following error.

INSERT INTO dump1090 ('hex','squawk','flight','lat','lon','validposition','altitude','vert_rate','track','validtrack','speed','messages','seen') VALUES ('e4827e','3670','TAM3754 ','-22.850818','-43.070628','1','10350','3328','8','1','219','162','161')

1064 - You have a syntax error in your SQL next to 'Hex','squawk','Flight','lat','Lon','validposition','altitude','vert_rate','Trac' on line 1*

  • 2

    Remove the quotes from the column names. Like this: INSERT INTO dump1090 (Hex,squawk.... but keep in the values.

1 answer

3

You should not use quotation marks to enter column names, only to enter non-numeric values.

Your Insert should look like this:

INSERT INTO dump1090 (hex,squawk,flight,lat,lon,validposition,altitude,
   vert_rate,track,validtrack,speed,messages,seen) 
VALUES ('e4827e',3670,'TAM3754 ',-22.850818,-43.070628,1,10350,3328,8,1,219,162,161)

In fact, the numerical values may come in quotes or not that the database treats this, but the alphanumeric values must be in quotes.

  • OMG do not believe 20 years of programming and did not realize this shitty kkk thank you !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.