This is the source code:
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`bio` varchar(2000) NOT NULL,
`age` varchar(3) NOT NULL,
`status` int(11) NOT NULL,
gender CHAR(1) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`gender`),
UNIQUE KEY `username` (`username`);
UNIQUE KEY `email` (`email`);
REFERENCES `Gender_Ref` (`gender`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
I don't get what's wrong. Help please?
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`bio` varchar(2000) NOT NULL,
`age` varchar(3) NOT NULL,
`status` int(11) NOT NULL,
gender CHAR(1) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`gender`),
UNIQUE KEY `username` (`username`);
UNIQUE KEY `email` (`email`);
REFERENCES `Gender_Ref` (`gender`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
I don't get what's wrong. Help please?
Last edited: