Hallo Leute,
ich hab das Problem das ich keine Fremdschlüssel erstellen kann und ich weis einfach nicht wieso.
ich kriege jedes mal den fehler:
SQL-Befehl:ALTER TABLE `kpi` ADD FOREIGN KEY (`times_id`) REFERENCES `times`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
MySQL meldet:
#1452 - Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (`test`.`#sql-2740_236a`, CONSTRAINT `#sql-2740_236a_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`))
tabelle KPI
Name Typ Kollation Attribute Null Standard Kommentare Extra Aktion
1 idPrimärschlüssel int(11) Nein kein(e) AUTO_INCREMENT
2 user_id int(11) int(11) Nein kein(e)
tabelle user
# Name Typ Kollation Attribute Null Standard Kommentare Extra Aktion
1 idPrimärschlüssel int(11) Nein kein(e) AUTO_INCREMENT