I got a syntax error flag in my "users" database table, but can't figure the issue out. Please, I need your help.
The following is the error message:
Error
SQL query:
--------------------------------------------------------- --
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`user_id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
`firstname` VARCHAR( 32 ) COLLATE utf8_unicode_ci NOT NULL ,
`lastname` VARCHAR( 32 ) COLLATE utf8_unicode_ci NOT NULL ,
`email` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
`phone` VARCHAR( 30 ) COLLATE utf8_unicode_ci NOT NULL ,
`birthday` DATE NOT NULL ,
`hash` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
`usersex` VARCHAR( 10 ) COLLATE utf8_unicode_ci NOT NULL ,
`userimage` VARCHAR( 64 ) COLLATE utf8_unicode_ci NOT NULL ,
PRIMARY KEY ( `user_id` ) ,
UNIQUE KEY `username` ( `username` , `email` , `userimage` , `phone` )
) ENGINE = INNODB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT =4;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-----------------------------------------------------------
--
-- Table structu' at line 1
And this is my "users" table:
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`firstname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`lastname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`phone` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`birthday` date NOT NULL,
`hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`usersex` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`userimage` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`username`,`email`,`userimage`,`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;