Hello all I’m trying to do the following insert to my database however every time I try it it fails with a vender error of 1064. I have two double fields for the lat and long, and an integer id. Could someone tell me what’s going on here?
INSERT INTO LatLong (lat, long) VALUES (51.53087375, -0.26259048);
The column
longis a MySQL reserved word. Surround it with backticks to fix the error:It’s a good practice, but not necessary, to surround all of your column and table names with backticks as well.