I'd like to write a SQL query to extract content from 2 custom post types(Chapters and Members) that have a relationship
Chapters and Members
1 chapter can be assigned to one member
infinite members can be assigned to one chapter
I've looked at the various tables but I'm not able to determine which tables contain the relationship info to do the necessary Join in my SQL statement. Would you please provide some insight or additional documentation on how to accomplish my SQL Query
While this information is helpful, it doesn't solve my problem. do you have schema documentation on the database tables you are using for relationships? I'm not using php or your api, I'm writing SQL.
Please check the following screenshot for schema: hidden link
The relationship with content is stored using the following database tables:
- {db-prefix}_toolset_connected_elements
- {db-prefix}_toolset_relationships
- {db-prefix}_toolset_associations
- {db-prefix}_toolset_type_sets
- {db-prefix}_posts