advice needed

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

My main articles fields points to various table's fields.

Those tables where the main article's field point to are filled by an
outside company. Often the table is dropped then filled again.

Now, as the records coming from the outside company aren't filled with all
kind of value, I must find a way to add values to point at, but not in the
table coming from outside.

for example:

mytable.idmodel points to theirtable.idmodel

When I retrieve the fields I've a inner join

select ...
from mytable inner join theirtable on mytable.idmodel = theirtable.idmodel.

Now, if I create a newtable where I create the missing records in
theirtable, how to link then the tables ? I want to avoid to create many
queries and then put the result together.

Should I create an other field mytable.myidmodel pointing to
mymodeltable.myidmodel or may I use the mytable.idmodel to point to

I aren't advanced enough in mysql to know how to do so.


Site Timeline