I have this problem, on my website i try to comment on a profile page, but when i click to submit it, it says
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 'to, msg, author,time)
VALUES ('52', Test','Sakaio911', NOW())' at line 1
All I’m doing is inserting the comment into the database, and you can see what columns. Is it the NOW() that causes it because i have no idea what im doing wrong.
The error message points you to the ‘to’ column name. According to the documentation, that name is reserved as a key-word. You will probably want to rename that col, or you will have to do some gymnastics to use that table.
http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html