db\Query params()

params() public method Sets the parameters to be bound to the query. See also addParams(). public $this params ( $params )$params array List of query parameter values indexed by parameter placeholders. For example, [':name' => 'Dan', ':age' => 31]. return $this The query object itself

db\Query orWhere()

orWhere() public method Adds an additional WHERE condition to the existing one. The new condition and the existing one will be joined using the 'OR' operator. See also: where() andWhere() public $this orWhere ( $condition, $params = [] )$condition string|array|yii\db\Expression The new WHERE condition. Please refer to where() on how to specify this parameter. $params array The parameters (name => value) to be bound to the query. return $this The query object itself

db\Query orHaving()

orHaving() public method Adds an additional HAVING condition to the existing one. The new condition and the existing one will be joined using the 'OR' operator. See also: having() andHaving() public $this orHaving ( $condition, $params = [] )$condition string|array|yii\db\Expression The new HAVING condition. Please refer to where() on how to specify this parameter. $params array The parameters (name => value) to be bound to the query. return $this The query object itself

db\Query one()

one() public method Executes the query and returns a single row of result. public array|boolean one ( $db = null )$db yii\db\Connection The database connection used to generate the SQL statement. If this parameter is not given, the db application component will be used. return array|boolean The first row (in terms of an array) of the query result. False is returned if the query results in nothing.

db\Query min()

min() public method Returns the minimum of the specified column values. public mixed min ( $q, $db = null )$q string The column name or expression. Make sure you properly quote column names in the expression. $db yii\db\Connection The database connection used to generate the SQL statement. If this parameter is not given, the db application component will be used. return mixed The minimum of the specified column values.

db\Query max()

max() public method Returns the maximum of the specified column values. public mixed max ( $q, $db = null )$q string The column name or expression. Make sure you properly quote column names in the expression. $db yii\db\Connection The database connection used to generate the SQL statement. If this parameter is not given, the db application component will be used. return mixed The maximum of the specified column values.

db\Query leftJoin()

leftJoin() public method Appends a LEFT OUTER JOIN part to the query. public $this leftJoin ( $table, $on = '', $params = [] )$table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name unless it contains some parenthesis (which means the table is given as a sub-query or DB expression). Use a

db\Query join()

join() public method Appends a JOIN part to the query. The first parameter specifies what type of join it is. public $this join ( $type, $table, $on = '', $params = [] )$type string The type of join, such as INNER JOIN, LEFT JOIN. $table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name

db\Query innerJoin()

innerJoin() public method Appends an INNER JOIN part to the query. public $this innerJoin ( $table, $on = '', $params = [] )$table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name unless it contains some parenthesis (which means the table is given as a sub-query or DB expression). Use an

db\Query having()

having() public method Sets the HAVING part of the query. See also: andHaving() orHaving() public $this having ( $condition, $params = [] )$condition string|array|yii\db\Expression The conditions to be put after HAVING. Please refer to where() on how to specify this parameter. $params array The parameters (name => value) to be bound to the query. return $this The query object itself