Jump to content


Photo

Error 1064


  • Please log in to reply
3 replies to this topic

#1 Dark-Hawk

Dark-Hawk
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 21 June 2003 - 07:19 PM

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

#2 holiks

holiks
  • Members
  • PipPipPip
  • Advanced Member
  • 83 posts

Posted 22 June 2003 - 01:35 PM

//edit
srry misunderstood the prob.

(mod plz del this post)
__________________________________________________________[br]$php = array('..a stack', '...once you pop', '...you don't stop');

#3 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 23 June 2003 - 02:59 AM

Try using
CREATE TABLE `tablename` (                                        `test` blob                                                      TYPE=MyISAM      
and u can also use text data type store text

<fieldname> text

Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#4 Blu_Smurf

Blu_Smurf
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts
  • LocationTexas

Posted 23 June 2003 - 03:35 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users