Filtering rows 

Table of contents

where is a numeric list of conditions that are combined with AND and passed to QueryBuilder::where(). Each condition maps to one method of the ExpressionBuilder:

where {
    10 {
        fieldName = pid
        parameter = ###CURRENT_ID###
        expressionType = eq
        type = int
    }
}
Copied!

fieldName

fieldName
Type
string
Required

true

The column the condition applies to.

expressionType

expressionType
Type
string
Required

true

The comparison operator, see Expression types.

parameter

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
Type
string

The parameter type keyword, see Parameter types. Not needed for isNull/isNotNull or when isColumn is set.

isColumn

isColumn
Type
boolean

Set to 1 to treat parameter as a column identifier (quoted with quoteIdentifier()) instead of a value. Use this to compare two columns, typically in a join condition.

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 inSet() value contained in a comma-separated column
isNull isNull() column is NULL
isNotNull isNotNull() column is not NULL

Parameter types 

The type keyword selects the \TYPO3\CMS\Core\Database\Connection parameter type used to bind the value:

type Connection constant
int Connection::PARAM_INT
string Connection::PARAM_STR
bool Connection::PARAM_BOOL
null Connection::PARAM_NULL
lob Connection::PARAM_LOB
int_array Connection::PARAM_INT_ARRAY (for in with integers)
string_array Connection::PARAM_STR_ARRAY (for in with strings)