Jump to content


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


PHPMyAdmin troubles

Recommended Posts

I\'m unbelieveably new to this, and I\'m just now starting to actually try and USE the stuff in PHPMyAdmin for my web site. Point for saying this is this: Please don\'t spit programmer jargon at me. It\'s not helpful.


My problem is this. I\'ve tried to make tables, but to no avail. I fill in the names of the columns, I pick out a type, I actually know what the types mean, I fill in a length, and I make a primary key. According to this one tutorial I\'m going off of, you don\'t need any more than that to create a basic table. Click the save button, and everythings OK, right?


Wrong. PHPMyAdmin keeps hacking up errors in the generated SQL syntax that I haven\'t the slightest clue how to fix, though I have tried changing my methods of entering stuff. The code looks like this-

CREATE TABLE `Character Names` (

`Name` TINYTEXT( 20 ) NOT NULL ,

`Male or Female` ENUM( \'male\', \'female\', \'either\' ) NOT NULL ,

`Meaning` TINYTEXT( 150 ) NOT NULL ,

PRIMARY KEY ( `Name` ) 



The error looks like this.


MySQL said:  



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 \'(20) NOT NULL, `Male or Female` ENUM(\'male\',\'female\',\'either\')


I\'ll give you a hug if you can help me. This is extremely aggravating.

Share this post

Link to post
Share on other sites

I can\'t guarantee this is your problem, but you should not use spaces in the names of your columns. You might try to substitute the name gender instead of \'Male or Female\'. Keep in mind that column names in your table are for your use only... nobody sees these, so keeping them simple and descriptive enough for your use is all that\'s necessary.

Share this post

Link to post
Share on other sites

It seems like MySQL doesn\'t allow you to specify a length for TINYTEXT types. I tried it without the length, but then got another error stating that the primary key didn\'t have a length. So I changed the \'Name\' column to type VARCHAR and specified the length of 20 and it worked ok. Hope this fixes your problem.

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.