Initially I had all columns under 1 table. In table shown below had one additional column for all media items.

did | disclaimer_title | disclaimer_body | disclaimer_media_items

But for some reasons, I need to pull out the disclaimer_media_items column into separate schema. So now I have 2 tables.

Table 1 schema

did | disclaimer_title | disclaimer_body

Table 2 structure:

did_media | disclaimer_media_items

Now what I want is when I insert media in table 2, the results get stored for table 1.

i.e. I want to achieve same functionality of all columns under table 1 with two individual tables.

I know 2 things can work, either foreign key or Drupal joins. How can I achieve this?

Hope I explained it well.

1 Answer 1


db_merge is the solution for this.

  • how did you implement this? post answer in detail.
    – WaQaR Ali
    Commented Sep 21, 2015 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.