Joining tables
join, leftJoin and rightJoin are numeric lists of joins, mapped to
Query,
left and
right. A join reads from an
existing table/alias, joins to another table (optionally under toAlias), and its where
list forms the ON condition using the same syntax as Filtering rows:
join {
10 {
from = tt_content
to = pages
toAlias = pages
where {
10 {
fieldName = tt_content.pid
parameter = pages.uid
expressionType = eq
# compare the two columns, no value binding
isColumn = 1
}
}
}
}
Copied!
from
-
- Type
- string
- Required
true
The table or alias the join starts from.
to
-
- Type
- string
- Required
true
The table being joined in.
toAlias
-
- Type
- string
Optional alias for the joined table. Defaults to
to.
where
-
- Type
- list
The join condition, using the condition syntax from Filtering rows.