For this query I am getting error
"INSERT INTO table "
+ "(item1,item2) "
+ "VALUES "
+ "(" + number1 + "," + number2 + ");"
The error says
Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘item1,item2) VALUES (10,1)’ at line 1
Any help appreciated.
Try this:
Tableis a MySql reserved word, so you should enclose it in backticks.Check other reserved words here