INSERT INTO pmessage (content, time, sent_by, to) VALUES ('k', '0000-00-00 00:00:00', 84, 1);
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) VALUES(‘tt’, ‘2011-04-28 14:04:45′, 84, 1)’ at line 1
The problem is i cannot see anything wrong with my syntax. There is nothing wrong with the column names etc, we tried many times. We copy/pasted the exact insert command from internet a few times than edited and still we got same error.
Anyone have any idea? The server is a MySQL 5 server
TOis a reserved word. See here: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html.Try this instead: