Skip to content
Advertisement

MySQL #1064 Error DATETIME

I’m making a web based mail system, and I have to create a table with this code:

MySQL says:

#1064 - 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 ''messages'( 'ID' INT(250) NOT NULL AUTO_INCREMENT, 'To' VARCHAR(250) NOT NULL,' at line 1

Might be the error is in DATETIME?

Advertisement

Answer

Get rid of the quotes around your column identifiers. Either use ticks or nothing at at all:

Or:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement