I keep getting this error:
MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server vers
maybe you forgot to add ";
" after this line of code:
`quantity` INT NOT NULL)
At first you need to add semi colon (;) after quantity INT NOT NULL)
then remove ** from ,genre,quantity)**
.
to insert a value with numeric data type like int, decimal, float, etc you don't need to add single quote.
Sometimes when your table has a similar name to the database name you should use back tick. so instead of:
INSERT INTO books.book(field1, field2) VALUES ('value1', 'value2');
You should have this:
INSERT INTO `books`.`book`(`field1`, `field2`) VALUES ('value1', 'value2');
In my case I was having the same error and later I come to know that the 'condition' is mysql reserved keyword and I used that as field name.