kool_samule Posted February 5, 2010 Share Posted February 5, 2010 OK chaps, Currently, I have a database with a (translation) projects table, and 3 jobsheet tables linked to the projects table by a foreign key. Each jobsheet can only have 1 'target' language, along with 'wordsgross'. What I'm after is a 4th table which can contain multiple 'target' languages, along with corresponding 'wordsgross', something like this: //TABLE: jobid (int) jobname (varchar) FK_projid (int) FK_langid (int) wordsgross (int) The FK_langid and wordsgross are the columns that need to be linked together, then repeated for each 'target' language. I'm not sure if this makes sense, the only other thing I can think of is a Car Insurance website when you need to 'Add Another Driver', then another, and another . . . .these multiple entries are still linked to same account, but allow 'unlimited' drivers (just like I need 'unlimited' languages). If my understanding of how to do this is completely wrong, please set me straight. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/191036-multiple-table-entries/ Share on other sites More sharing options...
jskywalker Posted February 8, 2010 Share Posted February 8, 2010 I'm not sure if this makes sense no, it does not..... But can you do a 'SCHOW CREATE TABLE ' on your projects table, and at least 1 of the 'jobsheets'-tables. I think the foreign key shoud be setup the same way to this new (4th) table, so the 'language'-field will not be a part of the foreign key. Quote Link to comment https://forums.phpfreaks.com/topic/191036-multiple-table-entries/#findComment-1008782 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.