katechan Posted December 8, 2003 Share Posted December 8, 2003 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. Quote Link to comment Share on other sites More sharing options...
Rheal Posted December 11, 2003 Share Posted December 11, 2003 Did you get this problem fixed??? Quote Link to comment Share on other sites More sharing options...
gizmola Posted December 11, 2003 Share Posted December 11, 2003 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. Quote Link to comment Share on other sites More sharing options...
PHPcadet Posted December 11, 2003 Share Posted December 11, 2003 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.