Skip Navigation

[Resolved] Post relationships table

This support ticket is created 2 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2458987

Greetings,
I would to find which table in the database is used to store the relationships for the saved posts.
For example if i have two post types: Company and Contracts with 1-many relationship (1 company can have N Contracts).
In the database where is it stored that Company with ID 1 has Contracts with IDS [1,2,3...]
Thanks in advance

#2460555

Hello,

I would suggest you to check the following tables of your database and try to understand the structure.
- wp_toolset_associations
- wp_toolset_relationships
- wp_toolset_type_sets
- wp_toolset_connected_elements

And it is not recommended to insert data into your database directly, you can try the built-in API function toolset_connect_posts():
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
Connects posts within a given post relationship.