Jump to content

Multiple TABLE entries


kool_samule

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.