Jump to content

Archived

This topic is now archived and is closed to further replies.

Dark-Hawk

Error 1064

Recommended Posts

Alright first I had it as:

CREATE TABLE contact (

id tinyint(4) NOT NULL auto_increment,

datetime varchar(100) NOT NULL default \'\',

ip_address varchar(16) NOT NULL default \'\',

name varchar(32) NOT NULL default \'\',

email varchar(80) NOT NULL default \'\',

msg varchar(3000) NOT NULL default \'\',

category varchar(250) NOT NULL default \'\',

PRIMARY KEY (id),

KEY id (id)

) TYPE=MyISAM;

 

and it said that max for varchar is 255 and it said to use blob so I changed it to:

CREATE TABLE contact (

id tinyint(4) NOT NULL auto_increment,

datetime varchar(100) NOT NULL default \'\',

ip_address varchar(16) NOT NULL default \'\',

name varchar(32) NOT NULL default \'\',

email varchar(80) NOT NULL default \'\',

msg blob(3000) NOT NULL default \'\',

category varchar(250) NOT NULL default \'\',

PRIMARY KEY (id),

KEY id (id)

) TYPE=MyISAM;

 

and it gave me the error:

ERROR 1064: You have an error in your SQL syntax near \'(3000) NOT NULL default \'\',

category varchar(250) NOT NULL default \'\',

PRIMA\' at line 7

 

any idea\'s on what is wrong here? Thanks

Share this post


Link to post
Share on other sites

//edit

srry misunderstood the prob.

 

(mod plz del this post)

Share this post


Link to post
Share on other sites

Try using


CREATE TABLE `tablename` (                            

           `test` blob                                          

           TYPE=MyISAM      

and u can also use text data type store text

 

<fieldname> text 

Share this post


Link to post
Share on other sites

Check out Navicat from http://www.mysqlstudio.com Best MySQL program out there to date, easily make, edit and manage databases/tables with this program.

 

It\'s not free, there is a30 day free trial, but there are also cracks going around for this program if you feel like walkin on the wild side. But, I suggest buying it, it\'s worth it

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.