Database Tabel Error

I keep getting this error message:#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 ‘’ at line 15

What is wrong with my code?

[code]CREATE TABLE maxgee23.events (

event_id INT NOT NULL AUTO_INCREMENT ,
first_name VARCHAR( 50 ) NOT NULL ,
last_name VARCHAR( 50 ) NOT NULL ,
password VARCHAR( 32 ) NOT NULL ,
email VARCHAR( 50 ) NOT NULL ,
phone_number VARCHAR( 11 ) NOT NULL ,
event_name VARCHAR( 250 ) NOT NULL ,
event_description VARCHAR( 3000 ) NOT NULL ,
event_start_date DATE NOT NULL ,
event_end_date DATE NOT NULL ,
event_location VARCHAR( 150 ) NOT NULL ,
event_family TINYINT NOT NULL ,
PRIMARY KEY ( event_id ) ,[/code]

Hi maxgeeproductions,

See if this does the job for you:[code]CREATE TABLE maxgee23.events (

event_id INT NOT NULL AUTO_INCREMENT ,
first_name VARCHAR( 50 ) NOT NULL ,
last_name VARCHAR( 50 ) NOT NULL ,
password VARCHAR( 32 ) NOT NULL ,
email VARCHAR( 50 ) NOT NULL ,
phone_number VARCHAR( 11 ) NOT NULL ,
event_name VARCHAR( 250 ) NOT NULL ,
event_description VARCHAR( 3000 ) NOT NULL ,
event_start_date DATE NOT NULL ,
event_end_date DATE NOT NULL ,
event_location VARCHAR( 150 ) NOT NULL ,
event_family TINYINT NOT NULL ,
PRIMARY KEY ( event_id ))[/code]

The changes are in the last line.

Those nasty commas get you every time… :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service