samc449 Posted September 11, 2015 Share Posted September 11, 2015 Hey when I import your SQL file into my database I get this error CREATE TABLE `users` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `type` ENUM('member','admin') NOT NULL DEFAULT 'member', `username` VARCHAR(45) NOT NULL, `email` VARCHAR(80) NOT NULL, `pass` VARCHAR(255) NOT NULL, `first_name` VARCHAR(45) NOT NULL, `last_name` VARCHAR(45) NOT NULL, `date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_expires` DATE NOT NULL, `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE INDEX `username_UNIQUE` (`username` ASC), UNIQUE INDEX `email_UNIQUE` (`email` ASC), INDEX `login` (`email` ASC, `pass` ASC) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; MySQL said: #1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause I can't continue in your book because I can't get pass this Also I believe the same occurs for the Orders table. Please help Link to comment Share on other sites More sharing options...
samc449 Posted September 11, 2015 Author Share Posted September 11, 2015 Page 53 Link to comment Share on other sites More sharing options...
Larry Posted September 12, 2015 Share Posted September 12, 2015 This is an error some versions of MySQL give (other versions have no problems with this). You can just change the date_modified column to not have a default value. Link to comment Share on other sites More sharing options...
Recommended Posts