Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Can you link together Field name + field from one table to two fields in another table

Featured Replies

  • Newbies

I am working with a Woocommerce installation and trying to create a product form interface. Woocommerce stores product attributes as meta_key's and values. I was wondering if there was a way of linking the table to a different table which would be more manageable and easier to use.

 

Below I have tried to illustrate the two different tables and was wondering if there was a way of linking them together allowing them both to update when information is entered. I have a feeling I might need to use global fields and calculations. However, not completely sure if it is possible.

 

Woocommerce Table

 

ID post_id meta_key meta_value
1 1 Field 1 Value
2 1 Field 2 Value
3 1 Field 3 Value
4 2 Field 1 Value
5 2 Field 2 Value
6 2 Field 3 Value

 

New Table, which should populate existing Woocommerce Table

 

ID post_id Field 1 Field 2 Field 3
1 1 Value Value Value
2 2 Value Value Value

I hope this makes sense and any advice will be greatly appreciated :)

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.