Appends some order by expression to protected prop Can be either a one-field name string, a string of fields separated by coma or an array of field names
Signature
public function orderBy([string
$fieldSet = '',
[string
$order = '',
[boolean
$escapeFields = true,
[boolean
$orderWithinFields = false]]]] )
Parameters
$fieldSet
—
string
fields for ordering
$order
—
string
SQL order direction like ASC/DESC
$escapeFields
—
boolean
determines if there's a need to escape fields with backticks or not
$orderWithinFields
—
boolean
allows to put individual sort direction(ASC/DESC) for each field specified. $fieldSet must be a RAW COMA-DELIMITED STRING value if using this parameter, as it's not processed in any way Keep in mind that this option ignores $order and $escapeFields params and fields should be escaped manually, if needed