I've read the tutorial, but there are several things I still needed clarification.
1. When any field is put into Model1's "Fields to retrieve", LEFT JOIN stopped working (syntax omitted altogether when viewing debug). No data is retrieved from Model2, regardless if there is anything under Model2's "Field to retrieve". Is this a bug?
2: How does one do INNER JOIN?
3: 'Subquery Join' just comes up with syntax error, no matter what I do. Has anyone figured this out yet?
4: We could set the Foreign Key, but what is the Primary Key it's linking to?
5: What are Special Fields?
Will update as I find more questions or answers to above.
1. When any field is put into Model1's "Fields to retrieve", LEFT JOIN stopped working (syntax omitted altogether when viewing debug). No data is retrieved from Model2, regardless if there is anything under Model2's "Field to retrieve". Is this a bug?
Model2's fields to be retrieved need to be included. If there is none of Model2's fields under Model1's "Fields to Retrieve", it simply omits Model2 altogether.
2: How does one do INNER JOIN?
Read_Data function only does LEFT JOIN. To do an INNER JOIN query, you'll need to use PHP code instead.
https://www.chronoengine.com/forums/posts/t106559/how-to-use-custom-database-query-table-view-in-ccv6
3: 'Subquery Join' just comes up with syntax error, no matter what I do. Has anyone figured this out yet?
Still a mystery.
4: We could set the Foreign Key, but what is the Primary Key it's linking to?
Default Primary Key is the first column of the other table (that doesn't contain the Foreign Key). If you need to set the Primary Key, use the Relation conditions field instead (eg. Model1.fieldA:Model2.fieldB).
5: What are Special Fields?
Will update as I find more questions or answers to above.