SQL syntax for LEFT JOIN of two related PODS Custom Post Types
-
I need help with the syntax of creating the ‘join’ parameter of a PODS extract.
I have two related PODS Custom Post Types; Location_Items is the parent of Location_Offers, and the relationship is supported by bi-direction fields in each CPT.The Location_Items POD (‘loc_items’) uses field ‘child_loc_offers’.
The Location_Offers POD (‘loc_offers’) uses field ‘parent_loc_item’I am using PODS to extract a complete list of Location_Items for only one Location, therefore I have set up a ‘where’ clause in the PODS parameters.
However, I want to also retrieve the related Location_Offers associated to each retrieved Location_Item.My (latest) attempt at the ‘join’ clause is as follows:
“LEFT JOIN ‘loc_offers’ ON ‘loc_offers’.’parent_loc_item.ID’ = ‘t.ID'”
This seems to align with the example in the documentation, but it’s not working.
I found that the single example in the documentation to be somewhat vague.What am I missing?
- The topic ‘SQL syntax for LEFT JOIN of two related PODS Custom Post Types’ is closed to new replies.