Filtering rows
Table of contents
where is a numeric list of conditions that are combined with AND and passed to
Query. Each condition maps to one method of the
ExpressionBuilder:
where {
10 {
fieldName = pid
parameter = ###CURRENT_ID###
expressionType = eq
type = int
}
}
fieldName
-
- Type
- string
- Required
true
The column the condition applies to.
expressionType
-
- Type
- string
- Required
true
The comparison operator, see Expression types.
parameter
-
- Type
- string or list
The value to compare against. A scalar for most operators, or a list for
in. The special value###CURRENT_ID###is replaced with the uid of the page selected in the module.
type
-
- Type
- string
The parameter type keyword, see Parameter types. Not needed for
isNull/isNotNullor whenisColumnis set.
isColumn
-
- Type
- boolean
Set to
1to treatparameteras a column identifier (quoted withquote) instead of a value. Use this to compare two columns, typically in a join condition.Identifier ()
Expression types
expressionType |
ExpressionBuilder method | Meaning |
|---|---|---|
eq |
eq | equal to |
neq |
neq | not equal to |
lt |
lt | less than |
lte |
lte | less than or equal to |
gt |
gt | greater than |
gte |
gte | greater than or equal to |
in |
in | value in a list (use an int_array/string_array type) |
inSet |
in | value contained in a comma-separated column |
isNull |
is | column is NULL |
isNotNull |
is | column is not NULL |
Parameter types
The type keyword selects the
\TYPO3\ parameter type
used to bind the value:
type |
Connection constant |
|---|---|
int |
Connection:: |
string |
Connection:: |
bool |
Connection:: |
null |
Connection:: |
lob |
Connection:: |
int_array |
Connection:: (for in with integers) |
string_array |
Connection:: (for in with strings) |