Code: Select all
Data field....... subtable_fkey
Type of list contents...... Sql [Native]
List content...... SELECT "field1" AS "field1", "ID" AS "ID" FROM "subtable" ORDER BY "field1"
Bound field....... 1
But now I wonder: How does it do that? How does it know to associate subtable_fkey with "ID" AS "ID" and not with "field1" AS "field1"?
The main motivation for my question is to basically understand how I can modify the SQL statement without breaking this amazing capability. The above SQL statement was copied from a tutorial without me really understanding how the fields are associated. For example, is it always the last field referred to in the "List content" SQL statement that gets matched with "Data field"?
Thanks,
Dave