Click to See Complete Forum and Search --> : SQL Error 1064 when try to run...


invision
11-27-2005, 12:38 PM
Hello,

Can anyone help me out.

When I try to run this with my MySQL client on my home computer :


drop database if exists survey
;

create database survey
;

use survey
;

create table surveys (
id TINYINT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL,
email VARCHAR(50) NOT NULL,
occup ENUM('Footballer','Trucker', 'Librarian', 'Lab Assistant', 'Technician', 'Lecturer', 'Other') NOT NULL,
reach ENUM('Typed the URL directly','In my favourites','A search engine','A link from another site','From a friend','Other') NOT NULL,
rating ENUM('1','2','3','4','5') NOT NULL,
involved ENUM('Website Design','Library','IT Work','Soccer','Test') NOT NULL,
comment TEXT,
date TIMESTAMP NOT NULL,
browser VARCHAR(50) NOT NULL,
ip VARCHAR(16) NOT NULL,
)
;

I get a 1064 error saying there is a problem on line 10 and 13 ?

Any ideas where I'm going wrong ?


Thanks.

invision
11-27-2005, 12:47 PM
call off the search.

it was the comma after the last 'NOT NULL'.

You know, when I submitted it I thought it was wrong, so I changed it and it worked.

Sorry for time-wasting.