db\QueryInterface addOrderBy()

addOrderBy() public abstract method

Adds additional ORDER BY columns to the query.

See also orderBy().

public abstract $this addOrderBy ( $columns )
$columns string|array

The columns (and the directions) to be ordered by. Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array (e.g. ['id' => SORT_ASC, 'name' => SORT_DESC]). The method will automatically quote the column names unless a column contains some parenthesis (which means the column contains a DB expression).

return $this

The query object itself

doc_Yii
2016-10-30 16:59:24
Comments
Leave a Comment

Please login to continue.