[eluser]Nummero2[/eluser]
Hi,
at the moment I have 3 mysql tables:
project table:
project_id (primary key, auto increment)
project_text (text field)
....
....
task table:
task_id (primary key, auto increment)
project_id (foreign key, if the task is part of a project)
task_text (text field)
....
....
protocoll table:
ptc_id (primary key, auto increment)
ptc_text (text field for protocoll)
....
....
With that I can create projects with added tasks or tasks on their own and protocolls on their own without any connections to tasks or projects. That should change
Now what I want to achieve:
- I want to connect the protocolls with the tasks and the projects, so a task or a project can have a own protocoll which is related to them
BUT
- I want to build a fourth table only for the keys so the seperated parts (project, tasks, protocoll) don´t know anything about the other ones. So no more foreign keys in protocoll table.
Example:
key table:
- project_id
- task_id
- ptc_id
Is that possible and how? Do I have to leave the keys out of the other tables then?
Greetings Sebastian :-)