PDA

View Full Version : MySQL error creating a table


Reaver
01-27-2002, 04:59 PM
PHPMyAdmin keeps spitting out a syntax error at me when I try to load this dumpfile:

CREATE TABLE links ( id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, link varchar(255), desc varchar(255), name varchar(255), PRIMARY KEY (id), UNIQUE id (id));

Where's the syntax error in that?? I even tried to create a table directly through PHPMyAdmin and it still gave me that.. any help would be appreciated!

mitsubishi
01-27-2002, 11:45 PM
Hi, you are trying to name a column "desc", you can't do that. Call it description or something, hang on... here it is a list of all reserved words: http://www.mysql.com/doc/R/e/Reserved_words.html

Reaver
01-27-2002, 11:54 PM
Ahh, thank you :)

Works fine now!

starlight
01-31-2002, 12:24 AM
wow i had a problem just like that too! ;/

White Chocobo
02-02-2002, 02:46 PM
lol same. But I guess that comes with not knowing a thing about MySQL.