0

I am trying to add this table..

CREATE TABLE playersByUser (
    userid INT,
    playername VARCHAR(255),
    ordering tinyint,
    CONSTRAINT FOREIGN KEY (userid) REFERENCES users(id)
) ENGINE INNODB;

I know the error has to do with the INNODB, but what can I look at or change to make this work?

My users table has the column id that is auto increment and a primary field.

users TABLE

users
CREATE TABLE `users` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `firstname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
 `lastname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
 `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
 `phone_number` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
 `username` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
 `password` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
 `salt` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
 `joined` datetime NOT NULL,
 `group` int(11) NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_c
Paul
  • 3,348
  • 5
  • 32
  • 76

0 Answers0