views:

23

answers:

1

Trying to load the following into a database:

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

use es;
-- -----------------------------------------------------
-- Table `events`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `events` ;

CREATE  TABLE IF NOT EXISTS `events` (
  `idEvent` INT NOT NULL AUTO_INCREMENT,
  `type` VARCHAR(255) NULL ,
  `name` VARCHAR(255) NULL ,
  `city` VARCHAR(255) NULL ,
  `state` VARCHAR(255) NULL ,
  `location` VARCHAR(255) NULL ,
  `shirtRequired` TINYINT(1) NULL COMMENT 'shirtRequired is a flag set by the Event Director to indicate if participants must purchase and/or wear an event shirt.' ,
  `eventImage` BINARY NULL ,
  `eventURL` VARCHAR(255) NULL ,
  `date` DATE
  PRIMARY KEY ( `idEvent` ) )
;

I am using mysql 5.1.36 and phpmyadmin using WAMP. I get the following 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 '( idEvent ) )' at line 12

I believe this caused by the use of a reserved word. However I am unsure. This mysql comes from a dump and I would prefer to not change it. I have heard about compability mode but cannot find out much about it. Would this help me? If so what do I need to do.

+2  A: 

You're missing a comma , after DATE

Sander Rijken
Wow that is crazy. This was a mysql dump. No coding at all.
Joe