mysql query - syntax error - cannot find out why
- by Phil Jackson
Hi all, im taring my hair out over this one. A query is throwing an error: 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, SUBJECT, DATE, READ, MAIL ) VALUES ( 'EJackson', 'dfdf', '1270974101', 'fa' at line 1
I printed out the query to see what could be the problem:
INSERT INTO db.tablename ( FROM, SUBJECT, DATE, READ, MAIL ) VALUES ( 'EJackson', 'dfdf', '1270974299', 'false', 'dfdsfdsfd' )
and finaly the structure consists of:
CREATE TABLE db.tablename (
`ID` int(12) NOT NULL auto_increment,
`FROM` varchar(255) NOT NULL,
`SUBJECT` varchar(255) NOT NULL,
`DATE` varchar(255) NOT NULL,
`READ` varchar(255) NOT NULL,
`MAIL` varchar(255) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
I cant find anything wrong. Any Help would be much appreciated.
( db.tablename is a replacement for the actual tablename )