[ENG] Foreign key creation problem
am 11.09.2006 09:06:57 von Bob BedfordI'm trying to create a foreign key for a table but I'm having troubles: here
is the error message:
Error in foreign key constraint of table xxx/#sql-1e4_34:\n FOREIGN
KEY(`IdCollaborateur`) REFERENCES
`collaborateur`(`IdCollaborateur`):\nCannot find an index in the referenced
table where the\nreferenced columns appear as the first columns, or column
types\nin the table and the referenced table do not match for constraint
My tables:
tbl report (Where I try to create the FK)
- idreport mediumint(9) unsigned auto_increment
- IdColl mediumint(9)
- report text
tbl collaborateur:
- IdCollaborateur mediumint(9) unsigned auto_increment
- name varchar(50)
Thanks for help.
Bob