Cytując manual:
Cytat
If MySQL reports an error number 1005 from a CREATE TABLE statement, and the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. Similarly, if an ALTER TABLE fails and it refers to error 150, that means a foreign key definition would be incorrectly formed for the altered table. You can use SHOW ENGINE INNODB STATUS to display a detailed explanation of the most recent InnoDB foreign key error in the server.
Więc sobie sprawdź i zobacz co dokładnie jest nie tak, jak nawet wtedy nie będziesz wiedział co jest nie tak to wklej dokładny kod błędu na forum i uprzejmie zapytaj o pomoc.
PS. Odzywki typu:
Cytat
I co dalej? Myślisz że jestes zabawny? Prosze nie spamuj w moim topicu, potem przychodzi ktos kto zna sie na rzeczy i ma problem zeby przekopac sie przez te wszystkie smieciowe posty.
Możesz sobie w zupełności darować.