Jump to content


Photo

New Table Problem


  • Please log in to reply
1 reply to this topic

#1 colinhanke

colinhanke
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 June 2006 - 02:35 AM

This is my first Mysql table attempt so it may be an easy or dumb fix but here we anyways. I am trying to create a table in phpmyadmin. I filled out the first portion that I need and it gave me this error:

"#1064 - 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 '.'36-40','41-45','46-50','51-55','56-60','61-65','66-70','71-75','76-80','81-85'' at line 1"

Here is the code that phpmyadmin used to query mysql:

CREATE TABLE `mktsurvey` (
`UI` VARCHAR( 20 ) NOT NULL ,
`Zip` CHAR( 10 ) NOT NULL ,
`Age` ENUM( '18-24', '25-30', '31-35'. '36-40', '41-45', '46-50', '51-55', '56-60', '61-65', '66-70', '71-75', '76-80', '81-85', '86-90', '91-95', '96-100', ) NOT NULL ,
`Children` ENUM( 'Yes', 'No' ) NOT NULL ,
`Online_hrs` ENUM( '0-1', '2-5', '6-10', '11-15', '+15' ) NOT NULL ,
`site_cool` ENUM( 'Yes', 'No' ) NOT NULL ,
`site_features` VARCHAR( 255 ) NOT NULL ,
`buy_child_online` ENUM( 'Yes', 'No' ) NOT NULL ,
`times_buy_chile_online` ENUM( '0-1', '2-5', '6-10', '11-15', '+15' ) NOT NULL ,
`myspace` ENUM( 'Yes', 'No' ) NOT NULL ,
`online_local_resources` ENUM( 'Never', 'A Little', 'Often', 'All the Time' ) NOT NULL ,
`partic_online_network` ENUM( 'Yes', 'No' ) NOT NULL ,
`partic_online_network_why` VARCHAR( 255 ) NOT NULL ,
`prize_want` VARCHAR( 255 ) NOT NULL ,
`stay_update` ENUM( 'Yes', 'No' ) NOT NULL ,
`lm_partic` ENUM( 'Yes', 'No' ) NOT NULL ,
`email` VARCHAR( 255 ) NOT NULL ,
`ip` VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( `UI` )
) ENGINE = MYISAM

any comments or quesitions would be greatly appreciated. Thanks.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 June 2006 - 06:47 AM

[!--quoteo(post=387909:date=Jun 25 2006, 10:35 PM:name=c_hanke)--][div class=\'quotetop\']QUOTE(c_hanke @ Jun 25 2006, 10:35 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
`Age` ENUM( '18-24', '25-30', '31-35'. '36-40', '41-45', '46-50', '51-55', '56-60', '61-65', '66-70', '71-75', '76-80', '81-85', '86-90', '91-95', '96-100', ) NOT NULL ,
[/quote]
Remove the trailing comma inside the parens, and you'll probably be fine.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users