Jump to content
Server Maintenance This Week. ×

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


Jimstrange

This topic is 3016 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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 :)

Link to comment
Share on other sites

This topic is 3016 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.