I have sql code for inser test value to db:
INSERT INTO log (from, value) VALUES ('ABC', 'DEF')
I have table log:
from | value
from and value are varchar(255).
When I run my code I a getting error:
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 'from, value) VALUES ('ABC', 'DEF')' at line 1
I don't know why, can you give me advice? I have a syntax error in code? Or what?
fromis a reserved word in SQL. It is a really bad name for a column. Change the name. I'm voting to close, becausefromis an obvious reserved word.