PDA

View Full Version : MySQL Error


Daniel
03-15-2006, 01:42 AM
When I try to execute this query:
CREATE TABLE `ipalert` ('
. ' `ip` VARCHAR(20) NOT NULL, '
. ' `message` VARCHAR(255) NOT NULL, '
. ' `djname` VARCHAR(50) NOT NULL'
. ' )'
. ' TYPE = myisam';
I get this error
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ''
. ' `ip` VARCHAR(20) NOT NULL, '
. ' `messa
Can someone help me out? Thanks in advance! :nervous:

filburt1
03-15-2006, 02:23 AM
Specify a default value when a column isn't null.

Xenon
03-15-2006, 11:37 AM
i think it's because of th ' . ' in the query string...

Daniel
03-15-2006, 11:25 PM
Thanks guys, I tried both of your suggestions and it works now. :)