I have a table called member:
create table member(id int NOT NULL auto_increment PRIMARY KEY, name varchar(255) NOt NULL, email varchar(255) NOT NULL, userName varchar(255)
NOT NULL, password varchar(255) NOT NULL, handicap int);
and trying to create a table stableford
which will have a foreign key name from the member
table:
create table stableford(id int NOT NULL auto_increment PRIMARY KEY, title varchar(255) NOT NULL, player_name varchar(255) NOT NULL, score int NOT NULL, INDEX(player_name), FOREIGN KEY(player_name) REFERENCES member(name));
Name of database is golfclub
I get an error cant create table 'golfclub.#sql-d1c_6' (errno:150)