Re: Error creating new table

From: Date: Mon, 08 Apr 2002 11:25:08 +0000
Subject: Re: Error creating new table
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-18411@lists.php.net to get a copy of this message
Newbie question that maybe should belong in a mysql group, but how and why does a varchar fragment a dbase? //Micke "Remco Oosten" <Remco@smartology.nl> skrev i meddelandet news:003c01c1ded7$72877760$c801a8c0@smartology.lan... > I don't think you can use text(50), > > It should be one of the following tinytext, mediumtext or text > Or you should use char(50). > > I would try to avoid using varchar() it fragments the database. > > Remco > > ----- Original Message ----- > From: "Lisi" <lists@shemeshdirectory.co.il> > To: <php-db@lists.php.net> > Sent: Monday, April 08, 2002 11:11 AM > Subject: [PHP-DB] Error creating new table > > > > I am trying to create the following table using PHPMyAdmin: > > > > CREATE TABLE IF NOT EXISTS ayny( > > organization varchar(50) NOT NULL, > > subtitle varchar(50) NOT NULL, > > img varchar(20) NOT NULL, > > width varchar(5), > > height varchar(5), > > link varchar(30) NOT NULL, > > maintext text(50) NOT NULL, > > boxtext text(50) NOT NULL, > > ID INT(9) NOT NULL AUTO_INCREMENT, > > PRIMARY KEY(ID) > > ); > > > > But I keep getting the following error: > > > > MySQL said: You have an error in your SQL syntax near '(50) NOT NULL, > > boxtext text(50) NOT NULL, ID INT(9) NOT NULL AUTO_INCREMENT,' at line 8 > > > > Any ideas what I'\m doing wrong? > > > > TIA, > > > > -Lisi > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.db (#18411) next »