Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/191036-multiple-table-entries/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.